function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vajralavajrala 

what happens when we use before insert and after insert

i need clarity about insert before and insert after.

what happens when we use before insert and after insert

please give me clarification with an example

Best Answer chosen by Admin (Salesforce Developers) 
vajralavajrala

Thank you sir.

 

All Answers

PremanathPremanath

First thing Before insert--

---> The Trigger will fire when the record before saving into the database.

After insert-->The Trigger will fire when the record after save into the database.

vajralavajrala

Thank you sir.

 

This was selected as the best answer
Vishal GuptaVishal Gupta
Before insert : Trigger fires before the record is committed to database.
After insert : Trigger fires after the record is committed to database.
vajralavajrala

Thank you.....