Trigger Settings
Generally, a trigger is Apex code that executes before or after specific data manipulation events occur, such as before object records are inserted into the database, or after records have been deleted (see Manage Apex Triggers in the Salesforce Help). JustOn Billing & Invoice Management implements triggers as a security mechanism to prevent specific billing-relevant data from being modified under certain circumstances.
Specific use cases, like some import operations or custom processes, may produce TriggerHelper
errors. That is, an intended operation may fail because a trigger prevents it from being executed. In these cases, you may need to disable this trigger.
To this end, JustOn Billing & Invoice Management has introduced the custom setting Trigger Settings. Trigger settings can disable Apex triggers if required. In normal practice, there are no trigger setting records, since the legal operation of the software requires them to be active.
Workflow
If an operation you want to execute produces a TriggerHelper
error, you can temporarily disable the corresponding trigger. To do so, proceed as follows:
(1) Create the corresponding trigger setting.
(2) Execute the operation as intended.
(3) Delete the trigger setting record.
Note
Use the trigger settings with caution. Disabling triggers may have unwanted effects.
Before disabling a trigger, contact JustOn Support for further advice.
Defining Trigger Settings
-
Click to enter Setup, then open Custom Settings.
In Salesforce Lightning, navigate to Custom Code > Custom Settings.
In Salesforce Classic, navigate to Develop > Custom Settings.
-
Click Manage in the row of Trigger Settings.
- Click New.
-
Specify the name as necessary.
The name must match the Apex trigger name to be disabled.
-
Click Save.
This creates the trigger setting record and immediately disables the corresponding Apex trigger.
Note
Make sure to delete the trigger setting record after you have executed the operation blocked by the trigger.