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
Haystack CertifiedHaystack Certified 

Life cycle of triggers causing other triggers to run

I have a question about the order of execution of intertwined triggers.  If a 'before' trigger causes updates to other records, does the second set of records go through the complete life cycle ('before' and 'update' triggers) before returning to the original trigger.  Or, does it just kickoff the second set and return immediately?  Is it undefined and could run in any order?

I have seen the help articles on order of execution, but they don't seem to address the intertwined scenario.

Any insight would be appreciated.

What do mean by second set of records?
Haystack CertifiedHaystack Certified
Here is an example.  Assume we have parent cases and child cases.  We have a 'before' trigger intended to run when parent cases are updated.  There is another trigger intended for child cases that are 'before' and 'after'.  The trigger for parent cases has logic to update child cases.  So, when the trigger for parent cases runs and updates the child cases, do the triggers for the child cases run to completion (i.e. 'before' and 'after' triggers) before returning to the parent trigger?