You need to sign in to do that
Don't have an account?

Save child delete on Merge
Hi Guys,
I have a unique problem here, my issue is
1) I have a child object on Account with Lookup relationship. I have a OnDelete trigger on Account, so when the Account is deleted the child gets deleted, so far good.
2) But when the Account is "Merged", in this case too the child record gets deleted and the merging of the records is incorrect.
I would like to able to differentiate, if the deletion of the Account is whether via 'merge' request or if specifically called.
I would then like to bypass it in the on delete trigger. I found a field MasterRecordId on account, but not sure, if it gets set on the Loser/deleted account.
Please advise.
Thanks,
Maverick
Triggers and Merge Statements
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_merge_statements.htm