Duplicate Detection not showing any results

I was working on an issue with Duplicate Detection reported by a customer. They had duplicate detection enabled on Contact with rules detecting records with the same firstname and lastname.

The steps they were following were:

  1. Create a Contact: John Smith
  2. Create a second John Smith Contact

The problem they were reporting was that when they entered the second “John Smith” the duplicate detection dialog was appearing; however, the dialog was not showing the potential duplicates.

Now because the same user was creating both Contact records, we thought it wasn’t a security issue, but we were only partially correct – it was a security issue but not related to Contact

The underlying problem was that the Duplicate Detection Rule was created in a different Business Unit and the user’s Security Role didn’t have Organisation-level read for Duplicate Detection rules. So CRM knew that a duplicate existed, but the user didn’t actually have permission to view the results.

The fix was simple: extend the user’s security role to include Organisation-level read permission of Duplicate Detection Rules.



Connecting to Dynamics 365 with TLS 1.2

Another fix for connecting to CRM 365.

I had a CRM ConnectionString that had previously been working but after an update to Dynamics 365 no longer worked. There didn’t seem to be any exception and the LastCrmError property didn’t contain anything helpful.

Continue reading


CRM Plugins – Input Parameters and Early Binding

I recently came across this problem looking at a CRM instance that had been upgraded to use early-binding. They had done something like below:

var accountInputParameters = ((Entity)context.InputParameters["Target"]).ToEntity<Account>();

This takes the InputParameters (which is of type Entity) and then bound it to the Account early-bound type.

While this seems like a good idea on the surface, as it allows all the fields of the Account to be accessed using strongly typed properties, the customer reported some strange behaviour on their Accounts.

Continue reading

CRM, JavaScript

Some helpful CRM 2016 Bookmarklets

I’ve been working in CRM Online (2016) a little for the past few weeks and I found these little bookmarklets to be helpful.

For those that don’t know, a bookmarklet is a snippet of JavaScript that can be saved as a Bookmark in Chrome, IE or Firefox. By prefixing your JavaScript function with javascript: you’re telling the browser to execute JavaScript rather than go to a particular URL

So far I have bookmarklets to

  • Print the current entity’s schema name
  • Print the current entity’s ID
  • Reopen the current entity’s form

The Print ones are quite nice because I used CRM’s in-built notification system.

Continue reading