Contents
How to migrate to second generation managed package?
Submit second-generation managed packages for security review, and list them on AppExchange. Use 2GP to create new managed packages. You can’t currently migrate a first-generation package to a second-generation package. Second-generation managed packaging addresses the specific needs of AppExchange partners.
What does 2GP mean for AppExchange partners?
Second-generation managed packaging (2GP) ushers in a new way for AppExchange partners to develop, distribute, and manage their apps and metadata. You can use 2GP to organize your source, build small modular packages, integrate with your version control system, and better utilize your custom Apex code.
When to use second generation managed packaging in AppExchange?
Second-generation managed packaging addresses the specific needs of AppExchange partners. If you’re a customer or system integrator and you don’t plan to distribute a package to multiple customers, unlocked packaging is the preferred tool.
What can you use 2GP for in Salesforce?
You can use 2GP to organize your source, build small modular packages, integrate with your version control system, and better utilize your custom Apex code. With version control being the source of truth, there are no packaging or patch orgs. You can execute all packaging operations via Salesforce CLI, or automate them using scripts.
Why should you use second generation packaging for your new Salesforce App?
Salesforce now has two ways to package an app: First Generation Packaging (1GP) and Second Generation Packaging (2GP). 2GP incorporates all of the benefits of our learnings from years of working with our partners with 1GP. It was also built in parallel with our development of Salesforce Developer Experience (SFDX).
How is version control system different from 2GP?
Your version control system is the source of truth (source-driven system) for the metadata in your package. And unlike 1GP, 2GP doesn’t use packaging or patch orgs. The packaging org owns the package. The metadata in the package resides in the packaging org.
Is there a way to update the version of a package?
You can update most properties of a package version from the command line. For example, you can change the package version name or description. One important exception is that you can’t change the release status.
Can a released version be listed on AppExchange?
Only released package versions can be listed on AppExchange and installed in customer orgs. Before you promote the package version, ensure that the user permission, Promote a package version to released, is enabled in the Dev Hub org associated with the package.
What does a namespace mean in Salesforce DX?
A namespace is a 1–15 character alphanumeric identifier that distinguishes your package and its contents from other packages in your customer’s org. A namespace is assigned to a package at the time that it’s created, and can’t be changed.
How to install second generation managed packaging in Salesforce?
When you use second-generation managed packaging, to be sure that you set it up correctly, verify the following. You can create and install a second-generation managed package directly from the command line.
How to use 2GP to build modular packages?
You can use 2GP to organize your source, build small modular packages, integrate with your version control system, and better utilize your custom Apex code. With version control being the source of truth, there are no packaging or patch orgs.
How to promote a package version in Salesforce?
Before you promote the package version, ensure that the user permission, Promote a package version to released, is enabled in the Dev Hub org associated with the package. Consider creating a permission set with this user permission, and then assign the permission set to the appropriate user profiles.