locked
How to stop a duplicate record form being created. RRS feed

  • Question

  • Hello,

    I'm trying to stop CRM Dynamics 2011 from creating a duplicate contact record.

    Can I invoke the Duplicate Roles using Javascript? 

    I know I can invoke roles using a plugin on the OnCreate Event, but I need to apply the duplicate role before the save is atempted by the user.

    What is the best way to achieve this?

    Monday, May 6, 2013 5:04 PM

Answers

All replies

  • Hi,

    In Ms crm 2011 there is a feature for detecting the duplicate records.If you use that you can overcome from this.

    If you like my answer please vote for my answer.

    thank you


    vasubabuk

    Tuesday, May 7, 2013 7:11 AM
  • Hello,

    Yes you can do that, You have option to query same entity using some specific value to check if record already exists with the same values, you can write retrieve multiple call using rest or soap, check SDK for sample code or you can also check for duplicate rules.


    Contact Me
    Follow me on Twitter
    My Facebook Page
    Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.


    Tuesday, May 7, 2013 7:51 AM
    Moderator
  • But the Duplicate Detection Roles are more optimized right?

    I ask this because I don't want to influence performance by executing a query every time the user changes a field.

    Tuesday, May 7, 2013 9:15 AM
  • Yes, correct duplicate detection are more optimized.

    Contact Me
    Follow me on Twitter
    My Facebook Page
    Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Tuesday, May 7, 2013 11:14 AM
    Moderator
  • So how can I call a Duplication Detection Rule from Javascript when a new record is being created??
    Tuesday, May 7, 2013 11:39 AM
  • You don't need to explicitly execute the dup detection rule. Once you have defined the Dup detection rules, CRM will automatically execute them every time a record is being created/updated and popup a box that shows the duplicate records found and allow the user to take appropriate actions.

    HTH

    Sam


    Dynamics CRM MVP | Inogic | http://inogic.blogspot.com| news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Wednesday, May 8, 2013 3:36 AM
  • You can set your duplicate  detection rule. Once you do that whenever a record is being created it'll give a popup  window which will let you know that duplicate records are found.

    puja jain

    • Proposed as answer by Puja Jain Wednesday, May 8, 2013 4:24 AM
    Wednesday, May 8, 2013 4:23 AM
  • Hi,

    You can't simply call duplicate detection using javascript, unless you will trigger any event like create/update specifically, so let's say you are changing any field value you need to save it only then duplicate detection rule will be initiated.

    HTH


    Contact Me
    Follow me on Twitter
    My Facebook Page
    Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Wednesday, May 8, 2013 5:09 AM
    Moderator
  • Turn on "Duplicate Detection" in your entity.

    Thursday, May 16, 2013 9:57 AM
  • Hi

    Create a new duplicate detection in CRM 2011 as per your requirements for particular entity and then enable/active that rule. So, now when you tried to create new entity record at that rule has been triggered and pop-up will be open which shown the duplicate records.

    Saturday, May 18, 2013 7:57 AM