You need to sign in to do that
Don't have an account?
Geetha 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
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
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
For more information refer the below link .
http://www.sfdc99.com/2015/01/19/the-one-trigger-per-object-design-pattern/
https://developer.salesforce.com/blogs/developer-relations/2011/04/apex-trigger-tip-using-a-class-per-object-to-control-logic.html