There are two types of triggers in Apex:

1. Before Triggers:

These are used to update/modify or validate records before they are saved to database.

2. After Triggers:

These are used to access fields values that are set by the system like recordId, lastModifiedDate field. Also, we can make changes to other records in the after trigger but not on the record which initiated/triggered the execution of after trigger because the records that fire the after trigger are read-only.

Our Recent Blog

Share This Post