How to check whether a salesforce instance is sandbox or not in apex Salesforce - Salesforce Globe For You
Solution: The 'IsSandbox' field of the organization object in salesforce gives the information where the instance is sandbox or production.
Name field:Name of the organization
InstanceName field:gives the instance name.
URL: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_organization.htm
Go to query editor of developer console and use the following query as shown in image
Select id, IsSandbox, OrganizationType from organization
Output:
No comments:
Post a Comment