Questions tagged [second-generation-packaging]

Filter by
Sorted by
Tagged with
2 votes
1 answer
74 views

Using Protected Custom Setting in Flows in 2GP Managed Package

I created a 2GP managed package that includes a protected hierarchy custom setting (let's say it is called namespaced__Protected_Custom_Setting__c) for some configuration that needs to be hidden from ...
3 votes
1 answer
70 views

Not able to delete second generation unlocked package

I have accidentally created two packages and I want to delete one of them. I tried the below command. sf package delete --package "my-pckg" --target-dev-hub my-dev But it results into the ...
0 votes
1 answer
35 views

How to Include Custom Metadata with Records in Second-Generation Package?

I'm currently working on packaging an application using second-generation packaging in Salesforce. As part of this process, I need to include custom metadata records along with the packaged components....
2 votes
1 answer
245 views

Lightning Message Channel deletion from 2GP or isExpose change to false

we failed security review of second-generation managed package because Lightning Message Channel (LMC) has isExposed=true. It should be false. The value of isExposed is not possible to change to false,...
1 vote
1 answer
21 views

Cannot create package version

When attempting to create a new Package Version, the following error message is reported. We couldn’t create this package version because new components were added or existing components were deleted....
0 votes
1 answer
52 views

Why is 2nd Gen Unlocked recommended over 2nd gen Managed package for Internal App development

As per Salesforce - "Salesforce offers different types of packages, and unlocked packages are especially suited for internal business apps. Unless you plan to distribute an app on AppExchange, an ...
0 votes
0 answers
35 views

Getting error while creating managed package from SFDX CLI

when i run this command - sf package version create --package "MY Package Name" --installation-key-bypass --codecoverage --wait 10 I get following error: Error (1): Multiple errors occurred: ...
8 votes
2 answers
2k views

Second gen package error about a component being a scratch org ancestor? What does this mean?

My sfdx-project.json looks like this: { "packageDirectories": [ { "path": "force-app", "package": "my package", ...
2 votes
1 answer
871 views

Adding a post-install script to a second generation managed package

I'm creating a second gen managed package using sfdx and I'm not sure how to add a post-install script. Most information I've come across involves updating the package from within an org. Is this ...
0 votes
1 answer
93 views

Unable to create the Patch Version for the Second Generation Managed Package

Unable to create Patch Version: This is the error: UNKNOWN_EXCEPTION : UNKNOWN_EXCEPTION: Managed Package Patch Modification Exception: A change was made to the patch release that will change the ...
0 votes
2 answers
45 views

When do I promote a 2G managed package?

When should we ideally promote a 2G managed package? We are planning to give the package to UAT and realized in order to install a new version of the package, we will have to uninstall the previous ...
0 votes
2 answers
106 views

Can we change Api Name of a field and change the Parameters and Return Type of an Aura Enabled Methods in a Patch Version

We have a Second Generation Managed Package which is live on AppExchange and we want to release a patch version with few changes. I have referred the Salesforce Documentation, still I have few doubts. ...
0 votes
1 answer
48 views

How can I create 2GP package version including FSL permissions

I'm using FSL Dispatcher Permissions and FSL Dispatcher License in test class for a scenario to cover code in my apex class. It worked fine when running the test class. But when doing a package ...
0 votes
1 answer
83 views

Is it possible to create a 2nd gen package depending on a external managed package?

So, that's the question, can I make depending on an external managed package (i.e. an app from the app exchange) my second generation package?
0 votes
0 answers
40 views

Does using Function (an Alternative to eval function in js) will impact Salesforce AppExchange Security Review

In our Second Generation Managed Package, we are using Function() as an alternative to Eval Function as mentioned in this link to evaluate an expression in Aura Component. Does it have any impact in ...
1 vote
0 answers
107 views

How does Permission Sets works against Licenses of Managed Package

We have built a Second Generation Managed Package and want it to be available as paid version in AppExchange Portal. So If a user buys it from AppExchange, he/she gets the licenses to use the solution....
0 votes
2 answers
94 views

Does Loading Static Resource Dynamically through URL pass the Salesforce AppExchange Security Review

We have created a Second Generation Managed Package and in it we need to load the static resource which is uploaded by the Subscriber (the one who installs the package). We have loaded the static ...
0 votes
0 answers
168 views

Unable to Create Second Generation Managed Package with Multi-Currency Enabled

We want to create a Second Generation Managed Package which works only on Multi-Currency Enabled orgs and all the Supported Salesforce Editions, so while running the package creation command, we are ...
1 vote
1 answer
55 views

Creating package version results in XYZ not available in this organization

In trying ot create a 2nd-generation managed package, I created a scratch org, added a custom meta data type, and tried to run the following to create a package version using the following: sf package ...
0 votes
1 answer
111 views

Lookup query exception while using USER_MODE

I am trying to create a 2GP package. But whenever I try to create a version by running and validating all test classes and metadata, the test class fails and shows such an error. "common.apex....
0 votes
1 answer
113 views

How to scan the Second Generation managed package code on Checkmarx Scanner from Partner Security Portal

I have created a second generation managed package using the dev hub org and namespace org and I have connected the dev hub org in the organizations subtab in publishing tab. But when I tried to login ...
0 votes
1 answer
105 views

How to Fix Security Violation AvoidGlobalModifier in a Promoted 2GP Managed Package for the Security Review

I did wrong and I promoted a non-security-review-ready version in a managed package. I have a global identifier and if I try to create a new version without the it, it triggers a Global/WebService ...
0 votes
1 answer
48 views

How to incorporate 2GP package metadata changes which is published but not submitted for security review yet

Below are the steps that I completed so far - Created 2GP managed package, created package version, Promoted package, Connected App. Yet to submit package for security review. Below is my query - ...
0 votes
0 answers
77 views

Why I do not see my 2nd Generation Package in my Dev Hub Manage package?

Recently I have created a 2nd Gen Package and I have been waiting to see it in my Setup> packaging>manage packages on my Dev Hub org. (Package has already one promoted version) I currently in ...
0 votes
1 answer
153 views

Upgrading a Second Generation Managed Package to next version

We have created a Second Generation Managed Package and published it in AppExchange and we need to release the next version with few changes in existing codes. These are the things which we don't ...
1 vote
1 answer
39 views

Queries related to AppExchange Destination org for 2GP

Please guide me for below queries for a 2GP created : Created a 2nd Generation package. Steps followed are as below : Source Org - Partner Developer Edition , Namespace created and linked to partner ...
0 votes
1 answer
58 views

Would Changing the Installation key of the Second Generation Managed Package needs once again approval from Salesforce

We have published our Second Generation Managed Package in AppExchange Portal after approval from Salesforce. But we want to update the installation key of the Package. Would it needs approval once ...
0 votes
1 answer
403 views

Error while promoting 2G package

I am facing this below error while promoting 2g package Error (1): The code coverage required to promote this version has not been met. Please add additional test coverage and ensure the code ...
1 vote
1 answer
474 views

AppExchange Security Review Requiring Fee Submission for FREE Listing Solution

Hope you are having a great day. We have developed an AppExchange solution to be listed. The solution's pricing model is set to free and the listing is submitted for approval. I have completed ...
0 votes
0 answers
86 views

Getting Debug Logs for 2nd Generation Managed Packages not on AppExchange

I have a 2nd-Generation Managed Package throwing an error. It is installed in an org other than my Dev Hub org, but I have sysadmin access to both. This package is not on the AppExchange, and so the ...
2 votes
1 answer
147 views

2nd gen package profiles issue

I stuck with issue with choosing custom profiles when 2nd gen package is installed. Package provides only 'No Access' and 'Full Access' settings, but in my project there are some custom profiles which ...
3 votes
1 answer
340 views

Error while creating a 2G Package version: Insufficient permissions: secure query included inaccessible field

Hope you're having a good day. I need some help resolving a problem I am facing while developing a 2nd Generation Managed Package. Following the ISV and SFDX Guide, when I create a 2G Package version ...
1 vote
1 answer
185 views

Branching and removing metadata from 2nd generation packages

We have a 2nd generation managed package with no dependencies that we develop on dev, qa, and prod branches. Only packages built from the prod branch are ever available to customers. I would like to ...
0 votes
0 answers
42 views

Can the pre-requisite features/settings required to install a managed package be reduced over time?

We have some managed package code that requires some features/settings (here shown in the project-scratch-def.json used for second generation packaging): { ... "features": [ ....
0 votes
1 answer
84 views

Error when install 2nd gen package flexipage to scratch org

I've got an error when deploying 2nd gen package to scratch org (Flexi_Page) Data Not Available The data you were trying to access could not be found. It may be due to another user deleting the data ...
1 vote
0 answers
81 views

Is it possible to create a second-generation Managed Package with a ConnectedApp without a first-generation Managed Package?

Looking at Salesforce's documentation, it appears the only way to create a ConnectedApp in a second-generation Managed Package is to first create it in a first-generation Managed Package? Is this true ...
0 votes
1 answer
123 views

Project with custom indexes fails on package build command

Writing an app to publish on the AppExchange, and this app contains some text fields that have a uniqueness constraint on them. As per the Salesforce documentation, when that constraint is applied the ...
1 vote
1 answer
482 views

Getting error when generating unlocked package version

I'm trying to create 2nd gen unlocked package version for a Trigger framework which is custom metadata driven. Every time I try to generate a version i'm getting error that custom fields in metadata ...
13 votes
2 answers
755 views

System.requestVersion() does not work in Second Generation Packaging

Environment sfdx-cli/7.58.2 win32-x64 node-v12.16.3 API 48 What's going on? When trying to create a managed packaged version with Second Generation Packaging (2GP) -with code check- that contains ...
0 votes
0 answers
52 views

How do I add logging on salesforce app in 2nd generation managed code?

How do I add logging on salesforce app? Assuming it would not be a good idea to aggregate logs to external system, if we do add logs it is going to sit in the customer's salesforce org. What is the ...
2 votes
0 answers
79 views

How to configure OAuth scopes for connected apps in 2GP

I'm confused about how the configuration of connected apps in a 2GP work. I've found a couple helpful pages in the documentation, but feel I'm still missing some important details. I currently have a ...
1 vote
1 answer
65 views

Do I need to open Salesforce Support case to be able to run Push Upgrade for the Minor or Major version of 2GMP?

Do I need to open Salesforce Support case to be able to run Push Upgrade for the Minor or Major version of 2GMP? As far as I can see, to be able to perform Push Upgrade for the Major or Minor version ...
4 votes
2 answers
373 views

Any way to list the contents of a 2GP (second generation package)?

I have an obscure error when installing a 2GP beta package about a component I don't expect to be the in the package. Is there a way to list the contents of a package given just a package version Id ...
0 votes
1 answer
211 views

Creating second generation package - stuck on Initializing

When we try to create a second generation package using CumulusCi we get stuck on the initializing part. This use to work fine but stopped working all at once. The steps to recreate is below. We also ...
1 vote
1 answer
442 views

Code coverage mismatched while 2gp packaging

I am currently trying to deploy my final release package but error stats that i don't have minimum code coverage to promote package. But when I create scratch org and run all test I could see no ...
5 votes
3 answers
672 views

Second-Gen Packaging Migration and Winter 21 release

There is a Salesforce Developers YouTube video from Dec 13th 2019: Introducing Managed Second-Generation Packages Which hinted that the Winter 21 release would include: Enabled migration of first-...
1 vote
0 answers
32 views

Select components to include in second-generation package

I am creating a package that shows an externally hosted web app in an Aura component. This component includes a canvas application. The Canvas App URL for the signed request is stored in a connected ...
2 votes
1 answer
71 views

2GP Patching Fails Due to Missing SalesProcess Value Even Though Same Code Packages Fine

We've been trying to patch with 2GP for a few months now but we're constantly hitting errors even when the only change is a comment in an apex class. Many errors were around reports so to try to get ...
1 vote
1 answer
1k views

What happens to the Client Id and Client Secret in the connected app for the package subscriber?

I have created a connected app in my org to perform the REST API call to the Metadata API. Now if I will make this connected app as part of my 2nd Generation Managed Package, Now my question is - Will ...
3 votes
2 answers
427 views

Can 2GP Packages be deleted?

Due to limitations with extension packages and SFDX Must have a package installed to push extension code Inability to view debug logs from base when installed in extension SFDX org we have had to ...