Qus:    When to use before triggers and when to use after triggers?
Aug 11, 2021 07:08 1 Answers Views: 481 RAMU
Prev Next
Answers (1)
NAIDU Aug 17, 2021 04:02
Answer:   Before Triggers – To perform the validations we should use before triggers.

If you are updating any field on the same object on which you are writing the trigger and no need to explicitly include the DML statements (already due to DML operation only trigger fire and it is still in progress at this point of time.)

After Triggers – If you are dealing with relationship records and if you need record id in these situations we should use after trigger (in before insert record doesn’t contain the record id).

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.

Let`s Connect