Before You Create Second-Generation Managed Packages
When you use second-generation managed packaging, to be sure that you set it up correctly, verify the following.
Did you?
- Enable Dev Hub and Second-Generation Managed Packaging in your Partner Business Org (PBO)
- Install Salesforce CLI
- Create and Register Your Namespace for Second-Generation Managed Packages
Developers who work with managed 2GP packages need a user license and permission set that provides access to the Dev Hub org. See Limited Access License for Package Developers and Assign Second-Generation Managed Packaging User Permissions.
-
Know Your Orgs for Second-Generation Managed Packages
Some of the orgs that you use with second-generation managed packaging (managed 2GP) have a unique purpose.
-
Link a Namespace to a Dev Hub Org
To use a namespace with a scratch org, you must link the Developer Edition org where the namespace is registered to a Dev Hub org.
-
Namespaces for Second-Generation Managed Packages
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 second-generation managed package (managed 2GP) at the time that it’s created, and can’t be changed.
-
Create and Register Your Namespace for Second-Generation Managed Packages
With second-generation managed packaging (managed 2GP), you can share a single namespace with multiple packages. Since sharing of code is much easier if your package shares the same namespace, we recommend that you use a single namespace for all of your managed 2GP packages.
-
Key Concepts in Second-Generation Managed Packaging
Let’s look at some key high-level concepts in second-generation managed packaging (managed 2GP).
-
How Manageability Rules and Ancestry Impact Upgrades for Second-Generation Managed Packages
Before you dive in and create your first second-generation managed package (managed 2GP), it’s important to understand these concepts, and how they affect each other.
-
Which Package Types Can Your Package Depend On?
Both second-generation managed packaging (managed 2GP) and unlocked packaging let you easily develop small interdependent packages and share logic between them. If you design your app to rely on small modular packages, both package creation and package installation are faster, and you’re less likely to hit limits.