Skip to main content
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 ...
RockPile's user avatar
  • 333
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 ...
Vivek M. Chawla's user avatar
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 ...
daveespo's user avatar
  • 2,703
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 ...
Aidan's user avatar
  • 14k
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 ...
Phil W's user avatar
  • 38.2k
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 ...
Mohith Shrivastava's user avatar
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 ...
sfdcfox's user avatar
  • 502k
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 ...
David Reed's user avatar
  • 93.7k
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 ...
David Reed's user avatar
  • 93.7k
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 ...
Michael Sobczak's user avatar
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 ...
Aidan's user avatar
  • 14k
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 ...
Pablo Fischer's user avatar
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 ...
Pablo Fischer's user avatar
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": {​​​​​​​​ "...
Ashish's user avatar
  • 2,372
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 ...
tugce's user avatar
  • 2,747
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 ...
sfdcfox's user avatar
  • 502k
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 ...
Azlam's user avatar
  • 111
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. ...
sfdcfox's user avatar
  • 502k
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.
Vicrum Vuppalapaty's user avatar
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.
sfdcfox's user avatar
  • 502k
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.
Balaji Malemarpuram's user avatar
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 ...
sanket kumar's user avatar
  • 15.6k
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 ...
LoMaPh's user avatar
  • 83
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 ...
Mert YALTI's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible