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

Account + Related Object Triggers on Account Merge



Couple of questions about merging Accounts, where there's one Master Acct and one or two 'victims':

  1. Clearly this causes an update to the Master and deletions to the victims.  Presumably these DML operations fire whatever Apex triggers are there.  Is there some field on the Account object that I can consult in an Update trigger, to tell me that this update was the result of a merge?  And - is there anything that gets set on a 'victim' Acct just before it's deleted, that a Delete trigger can consult to see that this deletion was the result of a merge - and to which Master Acct?
  2. The documentation says that all related lists of a 'victim' Acct are re-parented to the Master Acct.What about this operation - does it cause the Update triggers to fire on those related lists?  (I have a suspicion the answer is 'no'.)

Anyone out there know about this stuff?



I would love to get a reply on this, I'm looking for similar information:



I did find the answer to this - it's sitting right in the Apex Dev Guide. Check out the section "Triggers and Merge Statements".