Newer Version Available

This content describes an older version of this product. View Latest

Link a Namespace to the Dev Hub Org

To use a namespace with a scratch org, you must link the Developer Edition org where the namespace is registered to the Dev Hub.

Complete these tasks before you link a namespace.

  • If you don’t have an org with a registered namespace, create a Developer Edition org that is separate from the Dev Hub or scratch orgs. If you already have an org with a registered namespace, go to Step 1.
  • In the Developer Edition org, create and register the namespace.

    If you’re trying out this feature, choose a disposable namespace. Don’t choose a namespace that you want to use in the future for a production org. If you're registering a namespace for a production org, choose it carefully. Once you associate a namespace with an org, you can't change it or reuse it.

    Important

  1. Log in to your Dev Hub org as the System Administrator or as a user with the Salesforce DX permissions.
  2. If you have not already done so, define and deploy a My Domain subdomain.
  3. If you are using Salesforce Classic, switch to Lightning Experience. (Linking a namespace works only in Lightning Experience.)
  4. From the App Launcher menu, select Namespace Registry.
  5. Click Link Namespace.
  6. Log in to the Developer Edition org in which your namespace is registered using the org's System Administrator's credentials.
  7. To see the namespace that you linked, create a view on the Namespace Registry tab that displays all the linked namespaces.

    By default, the Namespace Registry tab displays only the recently viewed linked namespaces so your new linked namespace does not automatically display.