Last answered:

05 Dec 2022

Posted on:

05 Dec 2022

1

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)
Instructor
Posted on:

05 Dec 2022

1

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

Submit an answer