The Duplicate Detection feature in CRM 2011 is a great tool. The problem I’ve been having with it recently is that the rules have been spontaneously Unpublishing themselves. Or so I thought. As you might imagine this was causing us data quality issues and is not really what you want from a key feature.
It turns out, Duplicate Detection Rules are set to Unpublished whenever you Publish a Managed or Unmanaged Solution involving one of the entities referenced in the rule:
So, you can and will go from this:
Simply by making routine changes to your system. Not very cool, but at least I now know what’s going on here.
When will it happen?
Unfortunately its not quite as simple as saying that if you make any change to say the account, then related Duplicate Detection Rules will be unpublished. It’s a little more subtle than that.
This may well have changed in CRM 2013 but in my environment the following changes do not cause Duplicate Detection Rules to be unpublished:
- Modifying a relevant Form without exporting/importing a solution. i.e. doing a straight Customize->Form on the entity in question without going through a solution
- Adding a field to the entity, again not using a solution
- Deleting a field, not using a solution (though presumably you would be stopped from deleting a field that Duplicate Detection explicitly depended on).
So when does the issue occur? This is the interesting part – Duplicate Detection Rules will be unpublished if you import a solution containing a relevant entity even if you have changed absolutely nothing in the entity.
You can test this fairly easily. Set a rule up on the account entity, export a solution with the account entity in it and reimport it without making changes. You detection rules will have been unpublished.
It’s clearly a simple switch that says if you import a solution that even hints at involving a relevant entity – the rules will be unpublished.
Something to be aware of if you depend heavily of Duplicate Detection and make frequent changes to your system