[SalesForce] Way to identify Salesforce edition using API

Is there an API method to return what edition current customer is using?

Best Answer

You can query the OrganizationType from the Organization object.

select OrganizationType from Organization

As of API 32 possible values are: ["Team Edition","Professional Edition","Enterprise Edition","Developer Edition","Personal Edition","Unlimited Edition","Contact Manager Edition","Base Edition"]

Where Team Edition is commonly referred to as Group Edition and Base Edition is known as Performance Edition.

These values are derived from:

Schema.DescribeFieldResult dfr = Schema.sObjectType.Organization.fields.OrganizationType; List<String> values = new List<String>(); for(Schema.PicklistEntry ple : dfr.getPicklistValues()){ values.add(ple.getValue()); } system.debug(JSON.serialize(values));

Related Topic