+ Start a Discussion
RubavarnanRubavarnan 

Does Insert(before and after) and Update(before and after) come under a same transaction

Does Insert(before and after) and Update(before and after) come under a same transaction? Logically is it correct?
Deepak_KumarDeepak_Kumar
Hi Ruban,
I don't think so both of them are different events, So it should do not come under the same transaction.
And from the code execution flow before and after events are executes two times.


Thanks.
Bala Gangadhar VadlamuriBala Gangadhar Vadlamuri
Dear Ruban,
Deepak is partly correct, but if you are updating a field in insert event trigger or using workflow or process, then update event trigger will also execute. You can refer point 12 in  order of execution.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm

Regards,
Bala