Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Create a Snapshot for Use with Namespaced Scratch Orgs
While you can't use a namespaced scratch org to create a snapshot, you can create a
namespaced scratch org from a snapshot. That way, you can deploy namespaced metadata to the
scratch org. Snapshots are intended to include only dependent packages, metadata, and test
data.
- Create and register the namespace in the Dev Hub org and add it to the sfdx-project.json file.
- When you create the scratch org that you plan to use as the source of the snapshot, be sure to indicate the --no-namespace flag.
- Create the scratch org snapshot.
-
Create a
scratch org based on the snapshot.
The resulting scratch org has a namespace, which means that any unpackaged metadata from the snapshot is now namespaced in the resulting scratch org.