Skip to content

Feature

An instance of the forvendi.BreezzApi.BreezzFeature class (accessible via forvendi.BreezzApi.FEATURE) offers methods to manage environment checks (Sandbox vs. Production), dynamically enable or disable triggers per SObject, evaluate feature toggles, and verify user permissions.


isSandbox()

Verifies whether the current Salesforce organization environment is a Sandbox.

Signature:

public Boolean isSandbox()

Return Value: Booleantrue if executing inside a Sandbox org, false otherwise.


isProduction()

Verifies whether the current Salesforce organization environment is Production.

Signature:

public Boolean isProduction()

Return Value: Booleantrue if executing inside a Production org, false otherwise.


enableTrigger(SObjectType objectType)

Enables trigger processing for a specified SObjectType within the current transaction scope.

Signature:

public void enableTrigger(SObjectType objectType)

Parameters:

  • objectType: Target SObjectType for which the trigger should be enabled.

Return Value: void

Usage Example:

forvendi.BreezzApi.FEATURE.enableTrigger(Account.SObjectType);

disableTrigger(SObjectType objectType)

Disables trigger processing for a specified SObjectType within the current transaction scope.

Signature:

public void disableTrigger(SObjectType objectType)

Parameters:

  • objectType: Target SObjectType for which the trigger should be disabled.

Return Value: void

Usage Example:

forvendi.BreezzApi.FEATURE.disableTrigger(Account.SObjectType);

isTriggerEnabled(SObjectType objectType)

Checks whether trigger execution is currently enabled for a specific SObjectType.

Signature:

public Boolean isTriggerEnabled(SObjectType objectType)

Parameters:

  • objectType: Target SObjectType to check.

Return Value: Booleantrue if enabled, false if bypassed or disabled.

Usage Example:

Boolean accountTriggerActive = forvendi.BreezzApi.FEATURE.isTriggerEnabled(Account.SObjectType);

isEnabled(String featureName)

Evaluates whether a specific system feature toggle is currently enabled.

Signature:

public Boolean isEnabled(String featureName)

Parameters:

  • featureName: Developer name of the feature toggle to evaluate.

Return Value: Booleantrue if the feature is active, false otherwise.


hasCustomPermission(String featureName)

Checks whether the current context user has a specific Custom Permission assigned.

Signature:

public Boolean hasCustomPermission(String featureName)

Parameters:

  • featureName: Developer name of the Custom Permission to check.

Return Value: Booleantrue if assigned to the user, false otherwise.