I always thought that the duplicate detection rules in Dynamics 365 were a bit of a nuisance. Not because of the rules themselves, but because they are difficult to keep an eye on. The rules will unpublish automatically if you make any configurations to the entity the rule is for. That’s fine as long as you remember to publish the rules again. Unfortunately, you cannot add a list of your duplicate detection rules to an admin dashboard and keep an eye on them there. You always have to navigate to the duplicate detection rules area to see if the rules that are supposed to be published, are in fact published.
On a recent podcast of “Power BI and More”, I was talking to Joel Lindstrom and mentioned some of the more admin oriented records we could pull into Power BI and display there, including the duplicate detection rules. With Power BI, you’ll always be a refresh schedule behind on the data, so while not ideal, it could be a nice backup way of keeping an eye on those pesky rules, that are always unpublished precisely when you need them the most. I also said on the podcast that you could not do this with regular charts, because the duplicate detection rules are not chart supported. Technically a true statement, but… neither are security roles and we can create charts on those. We just need a supported starting point. So in an attempt to prove myself wrong, I used the same process as described in this earlier post on security roles, and simply pointed the link-entity in the user chart, to the duplicate detection rules records.
Now I have a chart like this on my admin dashboard and if any of those rules are unpublished, I’ll be sure to notice right away.
And since this a real Dynamics 365 chart, it is live!!!
Here’s the FetchXML part of the chart XML.
A couple of notes on this chart.
Duplicate detection rules generally have longer names that will be truncated on the axis. To avoid the truncation I’ve removed the axis and instead display the name on the bar itself. The process is described in this post.
Since the label is on top of the bar chart, I lightened the colors of the palette by adding some transparency to them.
Make sure that all users that own roles are included in your view. Sometimes there’s a “SYSTEM” user that owns some of the duplicate detection rules. This “SYSTEM” user is not necessarily included in the “Enabled Users” view.
Ideas for optimization
The chart as is, displays all the rules for users in your view. An additional filter could be applied inside the chart XML to only display the rules that are supposed to always be published. For example, including an * or similar in the name and then filter on that. That way you’d easily notice it, whenever a rule is not in the state that it is supposed to be.
Download the Duplicate Detection Rules Chart for Dynamics 365
I added this chart to the folder for downloading samples. Remember, charts are provided for fun only. Do not use in production without your own due diligence.
I hope you enjoyed the post. This is a chart that I am for sure adding to all instances where processes are dependent on active duplicate detection rules.
As always, please sign up for my newsletter or follow me on Twitter Follow @CRMChartGuy