Disable CPQ Triggers in Apex

You can manually disable Salesforce CPQ and Salesforce Billing application logic when you update records. This process is helpful when you’re updating your own custom field. It’s also helpful when you update a record several times in one transaction and want triggers to run only on the last iteration.

Required Editions
Available in: Salesforce CPQ Summer ’16 and later

To ensure that operational issues don’t affect your org when triggers are disabled, test thoroughly. Use the global Apex API TriggerControl—the same mechanism that Salesforce CPQ uses internally—to manually disable triggers for the CPQ and Billing and the Service Cloud for CPQ packages.

TriggerControl disables only triggers in CPQ and Billing and in the Service Cloud for CPQ package. Other triggers or Salesforce logic, or your own triggers, validations, workflow rules, or processes, are unaffected.

global static void disable();

Disables built-in CPQ triggers within the current transaction.

global static void enable();

Enables built-in CPQ triggers if they had previously been disabled.

global static Boolean isEnabled()

Returns true if CPQ triggers are currently enabled. Otherwise, returns false.