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
Dan WarrenDan Warren 

How to execute DML post merge

Hi,

I'm using the After Delete event on an Account that is being merged. A DML operation within this trigger is causing an update to the Master Account record throwing an exception.

I'm assuming this is beacasue it is trying to edit the Account whilst it is involed in a Merge operation.

What is the best way to submit the DML statement after the Account Trigger has finished firing?

My first thoughts are perhaps to submit the operation as queueable apex?