sfdc-trigger-framework icon indicating copy to clipboard operation
sfdc-trigger-framework copied to clipboard

Specify a Bypass by Type

Open kacrouse opened this issue 6 years ago • 1 comments

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.

kacrouse avatar Jul 26 '18 18:07 kacrouse

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?

renatoliveira avatar Jul 27 '18 15:07 renatoliveira