TDTM stands for Table Driven Trigger Management, enabling you to control and manage trigger events from a unified user interface. It offers a highly intuitive and user-friendly platform where you can oversee all your triggers and directly adjust their execution order. With TDTM, you can disable code associated with your automated processes, granting you control over when and if certain pieces of code operate.
Here are the steps to manage your triggers easily:
Prerequisites:
- Make sure you have added the below code snippet in your apex code
Steps:
- Open the PWR Commons Application
- Click on the "TDTM" tab
- Select the object for which you need to manage triggers, as shown in the image above.
- To have control of triggers from the UI, first, create the Trigger Configuration in the PWR Commons application by clicking on the "New" button
- Provide a label and select your Apex class from the "Implementing Class" dropdown, whose execution you want to control. (Note: Only classes containing the provided code snippet in the prerequisites will be displayed in this list.)
- Now, select the events you want to control, e.g., 'beforeinsert', 'beforeupdate'.
- Optionally, select the field under "Run on field Change". This will activate the trigger only when the value in the selected field is updated. Leave it blank if you don't want to specify a field.
- Click on "Save"
- Select the created trigger configuration whose execution you need to control and click "Manage Selected".
- Finally, you can either activate or deactivate those particular events and save the configuration.
By following the above steps, you can control the execution of different events for a particular class or trigger. By doing so, you can avoid major mistakes that might occur if you disable triggers that are critical.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article