How to force duplicate prevention on Entity creation? RRS feed

  • Question

  • Hello,

    I have a custom Entity called 'Foo' which is a N:1 Relationship to my 'Company' (Account) Entity. I want to disallow users in creating duplicate 'Foos'.
    The problem is, CRM seems to just warn the user about the duplicate, but still allows it to happen. How can I configure CRM to FORCE this duplicate from not being allowed? In N:N Relationships it seems to do this by default. How can I do this with N:1? Is creating a plug-in and intercepting and disallowing the creation in code the only way, or is this possible via configuration?

    Monday, February 22, 2010 7:55 PM


All replies

  • It's not possible via configuration. You'll need to write own plugin to do this.
    My Dynamics CRM Blog: http://bovoweb.blogspot.com
    Monday, February 22, 2010 10:59 PM
  • Any idea why MS designed it this way? Also, is it possible to do this in Javascript instead of a plugin?
    Tuesday, February 23, 2010 5:29 AM
  • Not sure why it was designed but generally people don't like forced behavior and prefer a choice.  If you would like Microsoft to consider a different design approach, please post your suggestion to the Microsoft Connect site.

    Thank you

    Best Regards | Twitter: edwardsdna
    Thursday, February 25, 2010 3:31 PM