sfdc-trigger-framework
sfdc-trigger-framework copied to clipboard
Specify a Bypass by Type
It would be helpful to be able to specify a bypass by passing in a Type rather than a String.
Examples:
TriggerHandler.bypass(AccountTriggerHandler.class);
TriggerHandler.clearBypass(AccountTriggerHandler.class);
TriggerHandler.isBypassed(AccountTriggerHandler.class);
This would create a hard reference to the class being bypassed, so typos would no longer be a possibility and the bypasses could be updated or removed when renaming or deleting a trigger handler.
Storing bypassed handlers as Types instead of Strings might not be a bad idea as well, though it wouldn't be entirely necessary for the public bypass APIs.
I've added this feature to my fork. It is already available in a PR (#13) I opened a while ago.
Can you check this out @kevinohara80?