-
Notifications
You must be signed in to change notification settings - Fork 422
MDTAccountTriggerHandler
This is a simple trigger handler class for Account that is used to demonstrate the custom metadata trigger handler approach to multiple trigger handler classes ordered by and controlled by custom metadata.
Inheritance
TriggerHandler > MDTAccountTriggerHandler
Inherited
TESTVISIBLE
Inherited
This is main brokering method that is called by the trigger. It's responsible for determining the proper context, and calling the correct method
AccountTriggerHandler.run();
Inherited
Allows developers to prevent trigger loops, or allow a limited number of them by setting the maximum number of times this trigger is called.
Param | Description |
---|---|
max |
A valid number (generally 1) of times you'd like to allow the trigger to run. |
In the context of a TriggerHandler class,
this.setMaxLoopCount(5);
Inherited
Allows developers to turn off the max loop count
In the context of a TriggerHandler class,
this.clearMaxLoopCount();
Inherited
Allows developers to conditionally bypass (disable) other triggers that also implement this triggerHandler
Param | Description |
---|---|
handlerName |
Class name (String) of the trigger handler to bypass |
TriggerHandler.bypass('AccountTriggerHandler');
Inherited
Removes a given trigger handler class name from the list of bypassed trigger handlers.
Param | Description |
---|---|
handlerName |
Handler class name to remove from the bypass list |
TriggerHandler.clearBypass('AccountTriggerHandler');
Inherited
Allows developers to check whether a given trigger handler class is currently bypassed.
Param | Description |
---|---|
handlerName |
The name of the trigger handler class to check for |
Type | Description |
---|---|
Boolean |
Boolean |
TriggerHandler.isBypassed('AccountTriggerHandler');
Inherited
removes all classes from the bypass list
Triggerhandler.clearAllBypasses();
Inherited
TESTVISIBLE
increment the loop count
Exception | Description |
---|---|
Throws |
loop count exception if the max loop count is reached |
Inherited
TESTVISIBLE
make sure this trigger should continue to run
Type | Description |
---|---|
Boolean |
Boolean |
Exception | Description |
---|---|
TriggerHandlerException |
thrown when executing outside of a trigger |
Inherited
TESTVISIBLE
SUPPRESSWARNINGS
context methods
Inherited
TESTVISIBLE
SUPPRESSWARNINGS
Virtual method for the implementing class to override
Inherited
TESTVISIBLE
SUPPRESSWARNINGS
Virtual method for the implementing class to override
Inherited
TESTVISIBLE
SUPPRESSWARNINGS
Virtual method for the implementing class to override
Inherited
TESTVISIBLE
SUPPRESSWARNINGS
Virtual method for the implementing class to override
Inherited
TESTVISIBLE
SUPPRESSWARNINGS
Virtual method for the implementing class to override