Register a Namespace for a First-Generation Managed Package
Salesforce automatically prepends your namespace, followed by two underscores (”__”), to all unique component names in your Salesforce org. A unique package component is one that requires a name that no other component has within Salesforce, such as custom objects, custom fields, custom links, and validation rules. For example, if your namespace is abc and your managed package contains a custom object with the API name, Expense__c, use the API name abc__Expense__c to access this object using the API. The namespace is displayed on all component detail pages.
- Begin with a letter
- Contain one to 15 alphanumeric characters
- Not contain two consecutive underscores
For example, myNp123 and my_np are valid namespaces, but 123Company and my__np aren’t.
- From Setup, enter Package Manager in the Quick Find box and select Package Manager.
- In the Namespace Settings panel, click Edit.
- Enter the namespace you want to register.
- To determine if the namespace is already in use, click Check Availability.
- If the namespace prefix that you entered isn’t available, repeat the previous two steps.
- Click Review.
- Click Save.