5

After Merging Contacts -> dig up a Contact in the Trash bin and you'll see something like:

enter image description here

Where does CiviCRM store this information? How does it track which Contact is merged with which Contact?

1
  • I can see an activity in the merged record, but I doubt that's what CiviCRM is using here. I looked in all the tables like "%log%" to no avail.
    – Alan Dixon
    Dec 16, 2019 at 19:27

1 Answer 1

6

An activity gets recorded when you merge and it looks up the target contact via that.

Use $winnerContact = civicrm_api3('Contact', 'getmergedto', ['contact_id' => $contactId]).

See also https://github.com/civicrm/civicrm-core/blob/5.20.2/api/v3/Contact.php#L1275

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.