Last active
March 18, 2021 21:35
-
-
Save erik4github/ff1ead972bdfda8fae2cdc680fc270d3 to your computer and use it in GitHub Desktop.
Determine if Salesforce org is sandbox in case there's something you need to enable on sandboxes but not prod
This file contains hidden or 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
@TestVisible | |
private static Boolean orgIsSandbox { | |
get { | |
if (orgIsSandbox == null) { | |
orgIsSandbox = [SELECT IsSandbox FROM Organization LIMIT 1].IsSandbox; | |
} | |
return orgIsSandbox; | |
} | |
set; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment