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
Glen CubinarGlen Cubinar 

How can I identify if a Contact Record being merge in a Trigger with Before Update event?

Hi Everyone,

I would like to ask how can I identify if a specific contact is being merge in a Trigger with Before Update event, there is a scenario when a Trigger Validation is being executed but I want to bypass is when merging contact records.

how can I identify that the Winner Contact was updated due to Merge process?

Thanks
AshlekhAshlekh
Hi,

I thinkg this link will have same question and will help you.
https://developer.salesforce.com/forums/?id=906F00000008zQ5IAI

-Thanks
Ashlekh Gera
Ashish DevAshish Dev
Glen,

1) In Contact trigger under "before delete" set variable with all the 'validated' IDs of looser records based on MasterRecordId field on deleted contact record.
2) in "before update" you can put error of validated IDs and   call @future  method of a utility class by passing validated IDs to undelete it