[SalesForce] Disable SteelBrick/CPQ Trigger from running in current trigger context

I have a method that runs an update on the SBQQ Quote. If I run it on a list of Quotes the CPQ code hits a soql 101 limit exception and I have no way of fixing it. My solution would be to temporaraly disable the CPQ trigger from running in my specific trigger context and then reenable it at the end.

I found a post on the steelbrick community hoever the method is not accessible. If I go to the installed package and disable the triggers my metod works fine. I need a way of disableing the cpq triggers for my specific trigger instance while other instances will continue firing the CPQ Triggers.

Here is a link to the post I found.

I also found the VF Page "EditSettings" and Controller "SBQQ.SettingsEditorController" for the Package settings but not sure I can access it via code, and even if I could I'm assuming if I disable the trigger like that it will disable it for everyone until I re-enable it.

Best Answer

Yes, CPQ triggers can be disabled in the apex context with these methods:

SBQQ.TriggerControl.disable();
SBQQ.TriggerControl.enable();
SBQQ.TriggerControl.isEnabled();

More information can be found here.

Related Topic