Feature
An instance of the forvendi.BreezzApi.BreezzFeature class offers a range of methods to manage various aspects of the Salesforce environment:
isSandbox()
Verifies if the current environment is a Sandbox, returning a boolean value indicating the result.
Signature:
forvendi.BreezzApi.FEATURE.isSandbox()
Return Value:
boolean
isProduction()
Verifies if the current environment is a Production environment, returning a boolean value.
Signature:
forvendi.BreezzApi.FEATURE.isProduction()
Return Value:
boolean
enableTrigger(SObjectType objectType)
Enables trigger for a specified SObject type.
Signature:
forvendi.BreezzApi.FEATURE.enableTrigger(SObjectType objectType)
Parameters:
- objectType - SObject type for which the trigger should be enabled.
Return Value:
void
Usage:
Map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe();
forvendi.BreezzApi.FEATURE.enableTrigger(gd.get('account'));
Or:
forvendi.BreezzApi.FEATURE.enableTrigger(Account.SObjectType);
disableTrigger(SObjectType objectType)
Disables trigger for a given SObject type.
Signature:
forvendi.BreezzApi.FEATURE.disableTrigger(SObjectType objectType)
Parameters:
- objectType - SObject type for which the trigger should be disabled.
Return Value:
void
Usage:
Map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe();
forvendi.BreezzApi.FEATURE.disableTrigger(gd.get('account'));
Or:
forvendi.BreezzApi.FEATURE.disableTrigger(Account.SObjectType);
isTriggerEnabled(SObjectType objectType)
Checks whether trigger is enabled for a specific SObject type.
Signature:
forvendi.BreezzApi.FEATURE.isTriggerEnabled(SObjectType objectType)
Parameters:
- objectType - The SObject type for which the trigger status should be checked.
Return Value:
boolean
Usage:
Map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe();
forvendi.BreezzApi.FEATURE.isTriggerEnabled(gd.get('account'));
isEnabled(String featureName)
Checks whether a feature with a specified name is enabled.
Signature:
forvendi.BreezzApi.FEATURE.isTriggerEnabled(SObjectType objectType)
Parameters:
- featureName - the name of a feature to check
Return Value:
boolean
hasCustomPermission(String featureName)
Checks whether the context user has a custom permission assigned.
Signature:
forvendi.BreezzApi.FEATURE.hasCustomPermission(SObjectType objectType)
Parameters:
- featureName - the name of a custom permission to check
Return Value:
boolean