function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Naresh ChandaNaresh Chanda 

Namespace for developer and packaging orgs

I have a developer edition org 'A', that is used as a packaging org for developing a lightning managed package. It has a namespace 'A'. As it is not a good practice to directly do development in packaging org, want to create another developer edition org for development purposes, but it will have a namespace 'B'. This is a problem as my code base that is developed in packaging org is strongly referencing namespace 'A'. How and what is the best practice that is followed to handle this situation in the industry?

Ashima nidhiAshima nidhi
Depends you can create a label or any other static way to introdure the same and then refer. But best in my case would be using it dynamically like:

string np = [SELECT NamespacePrefix FROM Organization].NamespacePrefix;