Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Duplicate Account Values listed in CRM

Posted on by 5,005

Someone on my team noticed today that when they are creating a case for an account, they can see 2 separate account names with the same account number. In the pic below attached, the first instance is the correct account to select as it has all of the contacts listed under it. The second listed account does not have any contacts loaded.

How to resolve this?

*This post is locked for comments

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: Duplicate Account Values listed in CRM

    is there any1 who worked on cozyroc?? its an urgent issue to b solved

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: Duplicate Account Values listed in CRM

    can i get any further suggestions?

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: Duplicate Account Values listed in CRM

    OK, wat is the final solution is. In above shown code it is just an temp variables but not updating anything right? Then how it is creating duplicates in Crm??

    Will mark as verified after the suggestion

  • Verified answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Duplicate Account Values listed in CRM

    Sorry Sandeep,

    Have not use CozyRoc.

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: Duplicate Account Values listed in CRM

    Should I remove temp?? Or I need t add new code?

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: Duplicate Account Values listed in CRM

    @Aric we are using cozyroc

    So, what we need to add to update the account in crm

  • Verified answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Duplicate Account Values listed in CRM

    The code above is not updating CRM, but a temp table. Not sure what you SSIS package does exactly, but look at your CRM Destination component (if using KingswaySoft).

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: Duplicate Account Values listed in CRM

    can i get help where the bug is ? will mark as verified if i get suggestion

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: Duplicate Account Values listed in CRM

    update dbo.z_temp_kgpcrm_account_customer

      set  dbo.z_temp_kgpcrm_account_customer.[Parent_Account] =

       (select top 1 p.new_UniqueID

       from dbo.AccountBase p

       where dbo.z_temp_kgpcrm_account_customer.[Parent_Account_no] = p.accountnumber COLLATE DATABASE_DEFAULT and p.new_UniqueID IS NOT NULL

       and p.new_UniqueID like '%-C' and [Relationship Type] not like 'BlueStream%')

    where exists(

      select '1'

       from dbo.AccountBase p2

         where dbo.z_temp_kgpcrm_account_customer.[Parent_Account_no] COLLATE DATABASE_DEFAULT  = p2.accountnumber  COLLATE DATABASE_DEFAULT

         and  dbo.z_temp_kgpcrm_account_customer.[Parent_Account_no] COLLATE DATABASE_DEFAULT  <>  dbo.z_temp_kgpcrm_account_customer.[Account Number]  COLLATE DATABASE_DEFAULT

         and  ISNUMERIC( dbo.z_temp_kgpcrm_account_customer.[Parent_Account_no]) = 1

         and p2.new_UniqueID like '%-C' and [Relationship Type] not like 'BlueStream%' )  ;

    update dbo.z_temp_kgpcrm_account_customer

    set [Parent_Account] = ''

    , Parent_Account_no = ''

    where ([Parent_Account] = [UNIQUE ID] or

    [Parent_Account_no] = [Account Number] or

    ISNUMERIC( dbo.z_temp_kgpcrm_account_customer.[Parent_Account_no]) <> 1 or

    [Parent_Account] not in  (select p.new_UniqueID

       from dbo.AccountBase p

       where dbo.z_temp_kgpcrm_account_customer.[Parent_Account_no] = p.accountnumber COLLATE DATABASE_DEFAULT and p.new_UniqueID IS NOT NULL

       and p.new_UniqueID like '%-C'  and [Relationship Type] not like 'BlueStream%'))

    and

    [Parent_Account_no] > ' ';

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: Duplicate Account Values listed in CRM

    But, we came to know that NAVISION is the master pager and we take data from Nav

    what i came to know is in SSIS package instead of updating the existing account its creating a new account there is some bug.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans