Would like to detect which Salesforce Edition my Apex classes are running. I've been pouring over the documentation but so far haven't found the right class and method to retrieve this as a string.
Any thoughts?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityQuery the OrganizationType
field from the Organization
object.
Organization org = [select OrganizationType from Organization];
Unlike most queries, you can assume that exactly one record exists for this query.
This field appears to be a pick list, so you can describe it to see all possible values.