I have a dev org, in which I have got a namespace prefix. In apex, I want to get this namespace prefix as string. Is there any straight way or I have to describe some object?
Tell me more
×
Salesforce Stack Exchange is a question and answer site for
Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.
|
Query for it, using a class that you know will be there:
|
||||
|
|
|
just hard code the prefix instead. The namespace in your sandbox is a constant, and won't change when you deploy your code. you'll be burning up a soql query everytime that class/trigger runs... |
|||
|
|
