Mayank Mittal
Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Can someone explain when to use Before Trigger and when After Trigger????
Could someone explain when to use Before Trigger and when After Trigger????
I'm pretty confused about this.
1 answers ( 0 marked as helpful)
Tsvetelin Tsonkov
Instructor
Hi Mayank!
Thanks for reaching out.
The difference between the AFTER and BEFORE trigger stands in the point in time that we would apply the condition imposed by the trigger. If we need a check before the DML, we would need a BEFORE trigger. If we need to perform an action after the DML, we use AFTER trigger.
Hope this helps.
Best,
Tsvetelin