Get the Namespace prefix of the organization

 How to get current salesforce org Name space prefix in apex using soql query?

Answer

String orgNamespace = [SELECT NamespacePrefix FROM Organization].NamespacePrefix;
System.debug('orgNamespace: '+orgNamespace);
Labels:
Join the conversation