"тнιѕ вℓσg ¢συℓ∂ ѕανє уσυя мσηєу ιƒ тιмє = мσηєу" - ∂.мαηנαℓу

Saturday 4 February 2012

Duplicate Detection in CRM 2011 --- Pitfalls



As you all know Duplicate Detection is a very good feature in Dynamics CRM 2011. But there are some useful tips to be remembered.


Lets consider a scenario.


Imagine that a user Mr.Derek would like to import some data into CRM 2011


Data Import feature in CRM 2011 is explained here http://crmdm.blogspot.com/2011/04/how-to-import-data-into-crm-2011.html


So Derek sets the 'Allow Duplicates' to No as shown below.




But please remember that the above option works based on the duplicate detection settings and duplicate detection rules defined.



Sadly, after the import Derek found duplicates. What could be the reason for this?

  There is a pitfall related to duplicate detection rules. As you all know, the duplicate detection rule must be in a published state if that has to be valid.
So in our case Derek was for sure that he published all the duplicate detection rules after defining them. But from his investigation, he finds that the state of the duplicate detection rule was turned automatically into unpublished later. And this is the pitfall.




Now the very important thing how does it happens ? How and Why the state of a duplicate detection rule turns from published to unpublished ?


We found the very useful information from a blog.
"By design, whenever any entity metadata is changed all duplicate rules associated with that entity are unpublished"
Here is reference for the above information.
Ref: http://www.madronasg.com/blog/duplicate-detection-rules-automatically-unpublished


Note: In simple words, whenever we do a release (importing solution to Test OR QA OR Production) if there is any change for an entity, say  for contact entity then the duplicate detection rule for contact would turn into unpublished state. So after importing a solution we need to make sure that the duplicate detection rules are in published state. This check could be done either manually or through scripts.


Hope this helps you !