Can’t Untangle Your Metadata? Try Org-Dependent Unlocked Packages (Beta)
Where: This change applies to unlocked packages created using Salesforce CLI.
As a beta feature, Org-Dependent Unlocked Packages is a preview and isn’t part of the “Services” under your master subscription agreement with Salesforce. Use this feature at your sole discretion, and make your purchase decisions only on the basis of generally available products and features. Salesforce doesn’t guarantee general availability of this feature within any particular time frame or at all, and we can discontinue it at any time. This feature is for evaluation purposes only, not for production use. It’s offered as is and isn’t supported, and Salesforce has no liability for any harm or damage arising out of or in connection with it. All restrictions, Salesforce reservation of rights, obligations concerning the Services, and terms for related Non-Salesforce Applications and Content apply equally to your use of this feature. You can provide feedback and suggestions for Org-Dependent Unlocked Packages in the Trailblazer Community.
Who: Users need the System Administrator profile or the Create and Update Second-Generation Packages permission.
Why: Longstanding and large production orgs often accumulate large amounts of metadata that are difficult to modularize when adopting a package-based Application Lifecycle Management (ALM) approach. With org-dependent unlocked packages, customers with large and complex orgs can now use unlocked packages without being required to resolve all of their metadata dependencies.
How: To enable packaging, first enable Dev Hub. From Setup, enter Dev Hub in the Quick Find box, and select Dev Hub. Then select Enable Dev Hub, and select Enable Unlocked Packages and Second-Generation Managed Packages.
Use the orgdependent CLI parameter on the package:create CLI command.
Then consider using Source Tracking in Sandboxes (Beta), to develop your org-dependent unlocked package.