AqEnv
Returns information about current Salesforce environment and controls settings such as for debugging and logging. Works in conjunction with the Env__c custom setting.
Group apex/core
Fields
public namespaceOverride → String
public nowOverride → DateTime
Stores overridden DateTime value for AqEnv.now()
public todayOverride → Date
Stores overridden Date value for AqEnv.today()
Properties
public isUsingStateCountryPicklists → Boolean
Indicates with State/Country picklists are enabled in the org
public namespace → String
public namespacePrefix → String
public defaultTimeZoneSidKey → String
No way to read this programatically
public timeZoneOffsetCompanyInMinutes → Integer
Returns current Org time zone offset from GMT in minutes
public timeZoneOffsetUserInMinutes → Integer
Returns current user time zone offset from GMT in minutes
public isDebugMode → Boolean
Returns system's debug mode state. See Env__c custom setting.
public currentOrg → Organization
The Organization record, lazy load and only once
public isSandbox → Boolean
Returns true if current org is a sandbox, false otherwise.
Methods
public static DateTime now()
Must be used in all apex code instead of DateTime.now() or System.now(). See also AqEnv.nowOverride
Returns
| Type | Description |
|---|---|
DateTime | DateTime |
public static Date today()
Must be used in all apex code instead of Date.today() or System.today(). See also AqEnv.TodayOverride
public static Date todayGmt()
public static String ifDebugMode(String message)
Returns the string if system is in debug mode, empty string otherwise. Allows messages to be more useful in debug mode