CRM 2013 SP1 Duplicate Detection Bug – Really a bug or expected framework behavior?

As many of us know, with CRM 2013 SP1, duplicate detection is back. Personally I liked it a lot because you can avoid potential duplicates just through configuration without writing plugins and also you get an option to continue with the duplicate record or to perform actions like merge on the duplicate records,

So came the requirement – “There should not be two records with the same field value in the same business unit” . So simple isn’t it. Happily i went ahead and suggested to apply OOB duplicate detection rules for this requirement. But my happiness was short lived. Lets us see why.

I have created a custom entity called ‘DupDetect’ for this demo. There is field called ‘Dup Field’ in this entity. To put the above requirement for this demo, there should not be two records with the same value of ‘Dup Field’ in the same business unit. So i went ahead and created the following duplicate detection rule and published it.

image

Now i move to entity and as you can see in the screenshot below, there is one record of DupDetect Entity with Dup Field value of ‘Dup 1’ owned by me.

image

Now i create one more record with the same ‘Dup 1’ in Dup Field and strangely the system does not show up any duplicates warning. As you can see below, there are two records with the same value for Dup Field and with me as the owner.

image

Well fine. duplicate detection did not work during create. I then thought of checking for update. I tried to change both the values for Dup Field to “Dup 2”. And voila now it shows a duplicate.

image

So I am not sure whether this is bug or not. My understanding is that during create when the duplicate detection is fired from the framework, the owningbusinessunit of the userid is still not deduced because owningbusinessunit of the record is deduced from the owner of the record. Hence did not show the duplicate detection pop-up. This is just my assumption and I would have to like your ideas on this.

 

Thanks for reading!

Advertisements

About Debajit
I am a Dynamics CRM Most Valuable Professional (MVP) with 10 years of experience in Microsoft .NET Technologies and 7 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side. Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com Author of multiple tools on codeplex including the 'Role Based Views' and 'CRM-Sharepoint Metadata manager & Attachment Extractor' which are available for commercial use under XrmForYou.com For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

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

%d bloggers like this: