Company shows up multiple Times in company find

has anyone seen this before? There is only 1 company record, but it shows up on the company find list multiple times. It doesn't happen to all companies.

  • 0

    It will be the view that is causing this. At a guess, the view being used here is:

    vSearchListCompany

    Which is:

    SELECT [Loads]
    FROM Company
    LEFT JOIN CRMEmailPhoneData epd_comp ON epd_comp.epd_EntityID = 5 AND epd_comp.epd_RecordID = Comp_CompanyID
    LEFT JOIN Person ON Comp_PrimaryPersonId = Pers_PersonId
    LEFT JOIN CRMEmailPhoneData epd_pers ON epd_pers.epd_EntityID = 13 AND epd_pers.epd_RecordID = Pers_PersonID
    LEFT JOIN Address ON Comp_PrimaryAddressId = Addr_AddressId LEFT JOIN Account ON Comp_PrimaryAccountId = Acc_AccountId
    WHERE Comp_Deleted IS NULL and Acc_Deleted IS NULL


    My guess would be that there is duplicate data in the CRMEmailPhoneData table, causing the duplicates to show up, but the best way of finding out is to run the view in SQL Server management studio, adding to the where clause with:

    AND comp_name = 'Hunter College-NYC'

    Then change the select to be:

    SELECT *


    Then comment out the joins one by one, so you can see which table is causing the duplicate. Once found, find the records and address them.

  • 0

    I've seen this after I upgraded from a previous version to v7.1 / v7.2. In my case, the phone and email deduplication process that occurred during the upgrade left duplicate phone number records in the PhoneLink and CRMEmailPhoneData tables. Due to the way the system view is written for the Company search screen, these duplicate phone numbers caused a single company to be listed multiple times in the results.

    I tracked down my issue by adding the comp_companyid field to the Company summary screen and checking each duplicate entry. If the same comp_companyid field appeared for each search result, I knew it was the phone issue.

    - Matt -