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
Geetha Chandran 1Geetha Chandran 1 

One Trigger per Object

Hello,
i am new to Apex code and have a question. I have built a new class on the Affilation object and my intention was to call the method from an after insert and after update trigger. Then I saw that the Affiliation object already has a trigger on it called TDTM_Affiliation. I understand that we should use only one trigger per object. How do I make sure that my new class is called from the existing trigger? I am not able to see what is in the TDTM_Affiliation trigger as it is a HEDA installed package. How do I do it? Any help would be greatly appreciated.

Thanks!
Geetha
JLA.ovhJLA.ovh
Best practice is not necessary "one trigger per object". It is one trigger per event and per object. An event is anything like before insert, before update, after insert....
You cannot update trigger code from an installed managed package. In this situation, you need to have your own trigger even if the package has already its own trigger on the same object and same event