Set up TDTM for your triggers

Modified on Thu, 09 May 2024 at 02:36 PM

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:

  1. Make sure you have added the below code snippet in your apex code

Steps:

  1. Open the PWR Commons Application
  2. Click on the "TDTM" tab
  3. Select the object for which you need to manage triggers, as shown in the image above.
  4. To have control of triggers from the UI, first, create the Trigger Configuration in the PWR Commons application by clicking on the "New" button
  5. 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.)
  6. Now, select the events you want to control, e.g., 'beforeinsert', 'beforeupdate'.
  7. 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.
  8. Click on "Save"
  9. Select the created trigger configuration whose execution you need to control and click "Manage Selected".
  10. 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

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article