function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Right Way? Write ALL code in one Trigger or Many

I have heard recently that it is best to put all the code into one trigger and create classes for each function.  However, I watched a training module and it said to break it out into separate triggers.  What is right?
Hi Tena,

We recommend  users to have one trigger per event per object,
Please see Best Practice #5: Streamlining Multiple Triggers on the Same Object at the link mentioned above. platform does not guarantee the execution sequence for multiple triggers with same event on the same object.

Thus, you need to make sure that you have one trigger per event per object.
Great.  I haven't seen this document before.  Thanks so much :)