CRM 2013: Bye-Bye Duplicate Detection!

Bye Bye duplicate detection on create/update of a record in CRM 2013! But no!! I don’t want to say good bye! What do I do?

Duplicate Detection in Dynamics CRM 2013

UPDATED 07 June 2014: CRM 2013 Service Pack 1 has restored this functionality. Read about it here.

———-

Here is another got’cha for CRM 2013 – especially for those customers upgrading from the previous version of CRM 2011 to CRM 2013. Here is what Microsoft says about duplicate detection for CRM 2013

Duplicate detection during create and update operations will not be supported for Microsoft Dynamics CRM updated user interface entities. Duplicate detection of individual records won’t be supported for custom entities as well. However, to detect duplicates in bulk, you can use the ‘BulkDetectDuplicatesRequest’ message and the ‘RetrieveDuplicatesRequest’ message….

That is, when you create/update e.g. a contact record, duplicate detection will no longer work even though you might have duplicate detection rules in place for the entity. From the new CRM 2013 UI, a user can trigger duplicate detection via a bulk duplicate detection job that a user sets up.

More importantly, duplicate detection will also not work when you are:

  • merging two records,
  • converting a lead,
  • activating/deactivating a record,
  • saving a completed activity.

Interestingly, you can still create duplicate detection rules as of old. They just don’t work for the above scenarios. They do, however, work for the following scenarios:

  • Bulk duplicate detection job
  • CRM for Outlook goes from offline to online (synchronisation)
  • During data import (Import Data wizard detects any duplicate records)

The detail straight from Microsoft is here.

I’m not sure if there is an official explanation from Microsoft as to why they removed the duplicate detection functionality for creation/update of records, but my guess is that duplicate detection on e.g. update of an entity record, interferes with the auto-save functionality Microsoft introduced to CRM 2013.

Closer Look at Duplicate Detection on CRM 2013

Out of the box CRM 2013 contains some default duplicate detection rules which  you can find in Settings > Data Management > Duplicate Detection Rules.

DupDetect-01

For example, I have deliberately created two accounts with the same “Account Name”, namely Navy House Ltd. No warning was triggered when I created the second record. Once the two duplicate records are created, you can set a bulk duplicate detection job on Accounts by clicking on the eclipse and you will see an option to “Detect Duplicates”.

DupDetect-02

Choosing the option “For All Records on All Pages” will automatically generate a system job of which you can specify the start time. To find the status of this job, go to Settings > Data Management > Duplicate Detection Jobs. Open the record and click on “View Duplicates”; this will show you the number of records identified by CRM as duplicates. The user will then have to make some decision on how to deal with the duplicate records, e.g. bulk delete, merge etc.

DupDetect-03

What Are We To Do Without Duplicate Detection For Creation/Update Of Records?

Before we all run screaming in panic, read on … luckily the open source community came to the rescue. I am aware of the following solutions to try to bridge the “gap” in this duplicate detection saga.

The first is an example in the CRM 2013 SDK (download it here). The relevant sample code is in “SampleCode\JS\DuplicateDetection”. SyedHussain has provided detailed instruction on how to import the solution here.

The second solution was released by Jason Lattimer on Codeplex. It is this second solution that I will be testing below.

CRM 2013 Duplicate Detection Solution on CodePlex By Jason Lattimer

So I followed Jason’s instructions and installed the managed solution for testing in my CRM 2013 environment. I used the built-in duplicate detection rule for Account (matching exact account name) and hooked up Jason’s JavaScript to the “OnLoad” event of the Account form.

DupDetect-04

When I now create an account record via the “NEW” button (top left) on the account form, the duplicate detection screen in Jason’s solution pops up as expected.

DupDetect-05

However, if you install this solution and your organization has the auto-save function turned on (as is the default in CRM 2013), the side effect here is that if I modify an existing account record so it has the same account name as another account record, the modified form will first warn you there are unsaved changes to the account form. After 30 seconds, auto-save will fire to try to update this modified account form and Jason’s duplicate detection screen pops up again.

DupDetect-06

So it seems that if you want duplicate detection to function properly without triggering every 30 seconds in CRM 2013, you will need to turn auto-save off. If, like me, you don’t want to turn form auto-save off, you will have to stick with scheduling bulk duplicate detection jobs for now.

Advertisements

7 thoughts on “CRM 2013: Bye-Bye Duplicate Detection!

  1. good article Priscila, I notice the MS link is broken. Did do you ever get any kind of explanation from MS as to why?

  2. Hi Priscilla,
    We are having a really hard time with CRM and Outlook contacts duplicates. My boss has nearly 6,000 contacts in his Outlook, and we have 4700 in CRM, owned by him, the other 20 in CRM are owned by me. There are duplicates on both ends…we have worked with Microsoft tech support so many times, and tried so many things, but we just need to figure this out once and for all! He just wants the duplicates cleared, and to have all his Outlook contacts tracked in CRM-currently all but 100 of his contacts in Outlook are tracked in CRM-some are duplicates that show as an Outlook contact, and a CRM contact.

    I would so appreciate any help, as I’m sure others are having this issue-but we have tried so many scenarios and nothing has stuck.

    Thank you in advance.

    Anelia

    1. Hey folks, are there any updates in this topic?
      I am not sure where they came from, but we have ~25.000 duplicates out of 62.000 contacts (~37.000 unique) in our CRM2015.
      I would need a bulk merge solution to get rid of them 😦

      Any help would be appreciated.
      Cheers, Oliver

      1. Hi Oliver I believe Power Objects have a bulk merge solution. Haven’t tried it but have had good experience with some of their other products

        cheers, Mick

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s