locked
Unique in CRM 2011 RRS feed

  • Question

  • Hi,

    I am very new to CRM 2011 not more than 2 moths of experience. 

    I need to create a unique constraint on two fields(i.e. the composition of  both two fields must be unique for an entity).

    How could it be achieved in CRM 2011?

    Thanks.


    sumit kumar

    Monday, May 7, 2012 11:42 AM

All replies

  • Use Duplicate Detection Rules

    Go to Settings-->Data Management-->Duplicate Detection Rules


    Thanks Anil Chelasani http://exploringxrm.wordpress.com

    Monday, May 7, 2012 11:58 AM
  • you should create duplicate detection rule:

    http://rc.crm.dynamics.com/RC/2011/en-us/online/5.1_CTP/vid_duplicatedetect.aspx

    http://www.youtube.com/watch?v=ZyQxFEAjRas

    i hope this helps.


    Software Specialist Crm

    Monday, May 7, 2012 12:36 PM
  • Hello,

    Duplicate detection is good approach but if I'm not wrong during creation/update of record Duplicate Detection engine will only warn about possible duplicate but will allow to save values.

    In case you want to guarantee 100% unique constraints you should develop plugin(or plugins) which will handle creation/update of records and will prohibit duplicates.


    Microsoft CRM Freelancer

    My blog (english)
    Мой блог (русскоязычный)
    Follow Andriy on Twitter

    Tuesday, May 8, 2012 2:38 AM
    Moderator
  • Thanks Andrii Butenko. 

    You are right about Duplication Detection engine. It only warns user and still user can create/update the record.

    The idea about plug-in is good. But my entity will have more than 2000000 record.

    Will it be good practice to create a plugin on large amount of data?

    As I know in plugin code I will search for the matching records and if record already exists, record would not be created.

    Is there any other way plugin can work?

    And How would plugin send response(message/alert) to user that record can not be created because it is duplicate?

    As I said earlier I have very little knowledge about CRM, Please suggest me what would be better approach? 


    sumit kumar

    Tuesday, May 8, 2012 5:07 AM