How to Identify Merged Companies

Hi,

We are on SageCRM 7.1.g

Is there a way to identify which 2 companies were merged together? The source company is marked as deleted and all associated entities (Addresses, People, Opportunities etc) have been updated with the target company ID. Is there a table or transaction which identifies the source, target and merge date - or anything other audit data about the merge?

Thanks
Frank

  • 0

    I am not aware of any way of seeing this easily, I had a think about it and came up with this: -

    SELECT DISTINCT(s.comp_name) [Source],s.Comp_CompanyId [Source ID],AdLi_AddressId,AdLi_CompanyID,t.comp_name [Target],t.Comp_CompanyId [Target ID]
    FROM company s
    LEFT JOIN Address_link on adli_addressId = s.comp_primaryaddressId
    LEFT JOIN company t on t.Comp_CompanyId = AdLi_CompanyID
    WHERE s.Comp_companyId <> adli_companyId

    Not the most elegant, so there may be a better solution to this. This is relying on the old company, having a primary address, which is now associated to the new company, so it is working on a presumption, and isn't bomb proof.

  • 0

    Thanks Toby, appreciate that. I can't think of a better way, either. To filter out some old, deleted bad address link data and to omit target companies which have subsequently been deleted, I added:

    and AdLi_Deleted is null

    and t.Comp_Deleted is null