Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Duplicate Detection Criteria For CRM Contacts

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,085 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,085 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans