19
votes
Second gen package error about a component being a scratch org ancestor? What does this mean?
I just ran into the same issue. Trying to install my namespaced package into a scratch org with the same namespace.
You need to create a scratch org without a namespace using the --nonamespace flag ...
17
votes
Accepted
Should DX Unlocked packages be used for app distribution to customers
TLDR: No, Unlocked Packages cannot be used like this. Anyone commercially distributing a Salesforce app must do so using Managed Packages. Also, Managed Packages offer many valuable features simply ...
9
votes
Accepted
Converting First Generation Managed Package to Second Generation (2GP) Packages
November 2020 Answer
Converting from 1GP to 2GP is in Developer Preview in the Winter '21 (Oct 2020) release. You can join the Partner Community group which has all of the instructions for getting ...
7
votes
Accepted
Permission set is deployed with unlocked package, but is missing permission. What could be the reason?
The link from @xedshot (https://help.salesforce.com/articleView?id=distribution_perm_sets_profile_settings.htm&type=5) is correct and relevant, but I feel that it's worth quoting and explaining ...
6
votes
Can a 2GP package include a post install page?
I raised this on the Partner Forums too. I got the following from two of the guys at Salesforce. Firstly Dileep Burki:
The postInstallURL supports the specification of a URL to which the installer is ...
4
votes
Organize Managed Package Dependencies with Unlocked Packages
One viable solution would be to directly clone the source code from git repo of these open source libraries into your project folder.
You can subfolders under the main folder as discussed by one of ...
4
votes
Organize Managed Package Dependencies with Unlocked Packages
Why is that a requirement?
Because it is intended that those packages will become part of a Classic Managed Package (1GP). This restriction prevents you from accidentally creating dependencies on a ...
4
votes
2GP Workflow and Upgrade Questions
Do I have to create a scratch org to be able to use 2GP?
Yes, 2GP packages are completely developed in scratch orgs.
Or can I create my changes in the SF developer org, test, and push to production ...
3
votes
Accepted
Can I delete a Platform Event from a Released 2GP Managed Package?
Summarizing comments:
Second-generation packaging currently does not allow deletion of managed components of any type. It's on the list at Gaps Between First-Generation and Second-Generation Managed ...
3
votes
SFDX 2GP: cannot create new managed package version
I worked with a colleague on this. The answer was to create the new package version as 1.1.0-1. For some reason, using 1.0.3.0 was not accepted. Having the beta version number be something other ...
3
votes
Organize Managed Package Dependencies with Unlocked Packages
My gut feeling is that you're facing an uphill battle here. To answer a question with a question: What are you hoping to gain by using unlocked packaging to manage your dependencies?
Dependency ...
3
votes
Second Generation Packages - Mismatching Versions
Important release notes from Salesforce - Spring 21 onwards
After your Dev Hub org is updated to the Spring ’21 release, you can
create packages with the release version set to previous.
Starting in ...
2
votes
Accepted
Second Generation Packages - Mismatching Versions
Salesforce has answered my question:
This is to share that packaging org where the package is developed
inherits the feature of the current release.
In your situation, DevHub is in Summer 20, where ...
2
votes
Package a custom field on LiveChatTranscript object using 2gp
We were able to package 2GP with a custom field on this LiveChatTranscript object by adding below attribute in scratch-def.json file.
"liveAgentSettings": {
"...
1
vote
Metadata Upgrade behaviour in Unlocked Packages
According to the documentation custom objects and fields are marked deprecated but not deleted if they contain data even if they were deleted on the upgraded package. Something similar happens for ...
1
vote
Accepted
Metadata Upgrade behaviour in Unlocked Packages
The only documentation I know of that addresses this issue is this old FAQ.
With unlocked packages, the admin has the flexibility to make these changes directly in production. The fact that these ...
1
vote
Is there a scripted/coded/API way to remove a metadata item from an Unlocked Package?
AFAIK, the only way to do that programmatically is through installing a new version of the package with mixed or delete as the UPGRADETYPE option. The other way to go through the UI and remove it and ...
1
vote
Accepted
Load data into object after Unlocked package
No, there's no automated way to load the data. You could use something like sfdx force:data:bulk:upsert or sfdx force:apex:execute to automate importing data, but this needs to be a separate step. ...
1
vote
When referencing a 1GP connected app from a 2GP package, what happens when the certificate associated with the connected app is updated?
This is not true. You will require a new version of the package to be uploaded. I have tried it, and it doesn't allow any connected app version that's not in a managed package.
1
vote
Accepted
When referencing a 1GP connected app from a 2GP package, what happens when the certificate associated with the connected app is updated?
You don't need to upload a new version of the Connected App, as it is a "live" system. The only requirement is that you include the correct version so that the dependency is formed.
1
vote
Page layout assignments in 2GP
For Standard objects, page layout assignment doesn't happen automatically with package installation. we have to assign manually after installation.
1
vote
Accepted
Difference between Unlocked vs Second Generation Managed Package
I can list down these:-
Second-generation managed packaging (2GP) is intended for AppExchange apps where as unlocked packages are especially suited for internal business apps. If you’re a customer or ...
1
vote
Second gen package error about a component being a scratch org ancestor? What does this mean?
Expanding on the answer of RockPile, in Salesforce docs it says:
Create a scratch org for user acceptance testing or to test installations of packages. In this case, you don’t want to create a ...
1
vote
Enforce default version order in Managed 2GP
What I use is more or less is something like this. This example doesn't have the ancestor info but you can store latest version Id in an ENV variable or a txt file as I do for the version number and ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
2gp-ama × 262gp × 19
managed-package × 13
unlocked-package × 10
salesforcedx × 7
isv × 5
appexchange × 3
package × 3
second-generation-packaging × 3
scratch-org × 2
namespace × 2
dev-hub × 2
deployment × 1
error × 1
salesforcedx-cli × 1
record-type × 1
connected-apps × 1
liveagent × 1
platform-event × 1
platform-bug × 1
unmanaged-package × 1
postinstall × 1
partner × 1
beta-managed-package × 1
versioning × 1