What can you do with an unlocked package?

What can you do with an unlocked package?

With unlocked packages, as the name indicates, you can still make changes to metadata that’s part of that package, even once it’s installed into production. For example, if an object is in an unlocked package and a system administrator needs to update the help text or label of a field, they can do so.

Can you change metadata in an unlocked package?

In fact, depending on the kind of metadata and how the developer of the managed package built their package, you may not be able to make any changes. With unlocked packages, as the name indicates, you can still make changes to metadata that’s part of that package, even once it’s installed into production.

How are unlocked packages used in production environments?

Those environments can be scratch orgs, sandboxes, and, of course, production. As you make updates to the metadata in your unlocked package, you create a new version of your package. Then you can install the new version in whatever environments you want to update.

How are unlocked packages used in AppExchange development?

If you’ve ever installed an AppExchange app, those features were deployed to your org using packaging. With unlocked packaging (now in Beta), this way of deploying and organizing changes is available to customers and partners.

Unless you plan to distribute an app on AppExchange, an unlocked package is the right package type for most use cases. You can use unlocked packages to organize your existing metadata, package an app, extend an app that you’ve purchased from AppExchange, or package new metadata. Unlocked packages follow a source-driven development model.

How to install unlocked packages in Salesforce command line?

You can create and install an unlocked package directly from the Salesforce command line. You include an entry in the sfdx-project.json file for each package to specify its alias, version details, dependencies, features, and org settings.

Why do we need unlocked packages in Salesforce?

With Salesforce DX, Salesforce launched Unlocked Packages and Managed second-generation packages (aka managed 2GPs). With that Salesforce want modular application development customers as they do for partners. Unlocked Packages are designed primarily to address the packaging needs of customers.

What kind of development model do unlocked packages follow?

Unlocked packages follow a source-driven development model. The source of truth of the metadata contained in the package is your version control system, not what’s in an org. This model brings with it all the benefits of modern source-driven development models.

What’s the purpose of an Org dependent unlocked package?

Some of the orgs that you use with unlocked packaging have a unique purpose. Org-dependent unlocked packages are a variation of unlocked packages that allow you to create packages that depend on unpackaged metadata in the org where you plan to install the package (installation org).

How are unlocked packages used in continuous delivery?

Supports interdependencies among unlocked packages. A single unlocked package can depend on multiple unlocked packages, and first and second-generation managed packages. Supports continuous integration and continuous delivery because the packaging CLI commands enable each step in the deployment pipeline to be fully automated.

Where can I install unlocked packages in Salesforce?

These Unlocked Packages and Package Versions can then be installed in any Scratch Org, Salesforce Sandbox, or Developer Edition Org. Unlocked Packages are the key technology for organizing your unpackaged Metadata and reducing the complexity of your Org. Most Salesforce Orgs contain a sea of unpackaged metadata.

How are unlocked packages used in Salesforce enterprise?

Salesforce enterprise customers have historically used org-based deployment approaches like Changesets and ANT deployment to deploy metadata to their orgs. With Unlocked Packages, there is a package-based deployment unit that offers an alternative to Changesets and metadata deploys.

How are unlocked packages used in Salesforce DX?

Org-dependent unlocked packages are a variation of unlocked packages that allow you to create packages that depend on unpackaged metadata in the org where you plan to install the package (installation org). You can create and install an unlocked package directly from the Salesforce command line.

What’s the difference between managed and unlocked packages?

When you think about putting pieces of your org into packages, understanding the difference between metadata in managed packages, metadata in unlocked packages, and metadata that isn’t packaged at all will matter. When metadata is part of a managed package, you have limited ability to change it.

How to create an Unlocked project in sfdx?

Each unlocked package “project” needs to contain its own sfdx-project.json file which defines all the details about an unlocked package. When you create a new scratch org, you need to install all of the dependencies into the scratch org first, then you push the data for the package.

Unlocked Packages can have dependencies on other packages, both Managed Packages and Unlocked Packages. Managed Packages cannot have dependencies on Unlocked Packages. Unlocked Packages can have multiple packages in a single org, unlike Managed Packages, which each require their own org.

What do unlocked packages do in Salesforce DX?

Unlocked Packages is a new type of packaging solution that is being offered as part of Salesforce DX. It provides a package-based solution for metadata organization, deployment and distribution for enterprise customers building Apps on Salesforce Platform.

Which is the best unlocked package for 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 unlocked package is the right package type for most use cases.

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.

Can a packaging Org own only one managed package?

We recommend that you enable Dev Hub in your Partner Business Org (PBO). A packaging org can own only one managed package. A Dev Hub can own one or more packages. The namespace of a managed package is created in a namespace org and linked to the Dev Hub. See Namespaces for more details.

What does 2GP mean in Salesforce DX project?

Package refers to a 2GP package. In your sfdx-project.json file, list the package directories separately in the packageDirectories section. Each local package directory adheres to the standard Salesforce DX project structure.