Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Duplicate Detection Criteria For CRM Contacts

(0) ShareShare
ReportReport
Posted on by 210

Hi All

I currently have an requirement to add the below condition in Dynamics CRM as a duplicate detection rule. How can i achieve this without using the java script or custom code.

(Last name and Date Of Birth) OR (Email and Mobile Phone) OR (Email and Home Phone)

*This post is locked for comments

  • Verified answer
    gdas Profile Picture
    gdas 50,089 Moderator on at
    RE: Duplicate Detection Criteria For CRM Contacts

    Hi Satkunam,

    yes its possible , you need to make ODATA Web API/FetchXML  request to get the data with condition , if records matches then prevent save using execObj.getEventArgs().isDefaultPrevented() and set form notification.

    Please refer below -

    msdn.microsoft.com/.../gg509060.aspx

    Make sure  doing validation in Javascript will not fire when record will create from other sources .

  • Suganthar_Satkunam Profile Picture
    Suganthar_Satkunam 210 on at
    RE: Duplicate Detection Criteria For CRM Contacts

    Thanks for this. In case, if i require to use the java script, how can i invoke the duplicate dectection dialog with all the possible duplicate records? Is it possible to invoke by java script

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Duplicate Detection Criteria For CRM Contacts

    All the condition use And in Duplicate detction, from SDK-

    "A rule can have one or more duplicate detection rule conditions that are represented by the duplicate rule condition (DuplicateRuleCondition) entity. The conditions are combined by the system as in logical AND operation. A duplicate detection rule specifies a base entity type and a matching entity type. A duplicate rule condition specifies the name of a base attribute and the name of a matching attribute. For example, specify an account as a base entity and a contact as a matching entity to compare last names and addresses. The matching criteria consist of operators such as exactly match, first n-number of characters, or last n-number of characters."

    reference: msdn.microsoft.com/.../gg309427.aspx

    So if you want to implement your requirement you need to look for to implement plugin logic.

  • Suggested answer
    gdas Profile Picture
    gdas 50,089 Moderator on at
    RE: Duplicate Detection Criteria For CRM Contacts

    Hi Satkunam,

    Dynamics CRM does not support AND/OR condition in the duplicate detection rules. Try to create three different rules with those condition.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,575 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans