Hi I'm trying to totally wrap my head around how one trigger's execution could affect another. To make things clearer here's a scenario. Say I have 2 objects A and B. Both objects have a trigger each that fires after update. Object A makes an update on object B. By the order of execution as seen here, number 6 (Executes all after triggers) and number 17(Commits all DML operations to the database) at what point during Object A trigger execution does the Object B trigger fire? Is it at number 6 or after the commit of all DML operations to DB at number 17?
1 Answer
Triggers only fire on DML operations which you have already pointed out, does not occur until step 17 in the order of execution seen below and here.
So in your scenario, The trigger for Object B will not fire until step 17 (the DML operation is committed) in the trigger for Object A.
-
thanks for the quick answer and explanation. It does makes sense to me. Commented Aug 28, 2014 at 15:51