You need to sign in to do that
Don't have an account?
Neeraj Sharma 103
Hi Everyone Anyone Help Me I want to use After Insert,After Update,After Delete in one trigger
Hi Everyone Anyone Help Me I want to use After Insert,After Update,After Delete in one trigger througth trigger Handler and
i want to call all these events in one method from trigger in trigger handler class
Anyone Have Example anyone do this types of scenarios when used these events so please help me
i want to call all these events in one method from trigger in trigger handler class
Anyone Have Example anyone do this types of scenarios when used these events so please help me
Greetings to you!
I have used After Insert, After Update, and Before Delete in one trigger and also I used a single method in all three cases. I have used it before delete because after deleting a record we cannot use its id that's why I used before delete. And, it's also a best practice to not use after delete always tries to use before delete.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com
All Answers
Let us take an example
//Get the count of contacts in Accounts where Mailing country = USA(Accounts lookup into contacts) Then you can call this method from trigger like this.
Thank You
www.nubeselite.com
Developement | Training | Consulting
Please mark this as solution if your problem resolved.
Greetings to you!
I have used After Insert, After Update, and Before Delete in one trigger and also I used a single method in all three cases. I have used it before delete because after deleting a record we cannot use its id that's why I used before delete. And, it's also a best practice to not use after delete always tries to use before delete.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com