Created
June 11, 2021 20:42
-
-
Save conrjac/1d1db5abbd085bd7e73e52ac0da8de23 to your computer and use it in GitHub Desktop.
SOQL Query to determine if your org is a sandbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Organization currentOrg = [SELECT Id, IsSandbox, Name FROM Organization LIMIT 1]; | |
If(currentOrg.IsSandbox == True) | |
{ | |
System.Debug('Your in a sandbox!'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT Id, IsSandbox, Name FROM Organization LIMIT 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment