locked
Do not allow saving any of Duplicates found in Duplicates Detected RRS feed

  • Question

  • Hi

    I am trying to restrict the users in saving the records found in duplicates detected.
    I found in one of the blogs by ayaz that we can do this using the following

    // Update operation – do not update, if a duplicate exists.
    UpdateRequest requpdate = new UpdateRequest();
    requpdate.OptionalParameters = new OptionalParameter[] { new CreateDuplicatesOptionalParameter(false) };

    But i am getting error in the second line that "CreateDuplicatesOptionalParameter' does not contain a constructor that takes 1 ARGUMENTS'

    can anyone help me in this.
    Thanks, Aarch
    Thursday, April 30, 2009 7:21 AM

Answers

All replies

  • Hi Aarch,

    you have to create a CreateDuplicatesOptionalParameter instance and you have to set the Value property to false.

    Reference:
    Constructor
    http://msdn.microsoft.com/en-us/library/bb928893.aspx
    Value Property
    http://msdn.microsoft.com/en-us/library/bb930172.aspx

    Best regards,
    Jürgen
    Jürgen Beck

    Dipl. Kfm./Wirtschaftsinformatik
    MVP, MCSD.NET, MCITP DBA, MCDBA, MCSE
    Microsoft Certified Business Management Solutions Professional
    Microsoft Certified CRM Developer
    Microsoft Certified Trainer

    ComBeck IT Services & Business Solutions
    Microsoft Gold Certified Partner
    Microsoft Small Business Specialist

    Developing & Supporting Business Applications from small business to big enterprises covering scores of sectors

    http://www.combeck.de
    Thursday, April 30, 2009 8:05 AM
    Moderator
  • Yes Jurgen Beck,

    i did the same, the error went thank you..
    But when i register and test in server, i get an error whenever i try an update in the entity and the entity is not specific...it just says the general error" Problem occured contact your system administrator"

    can you help me out in this
    Thanks, Aarch
    Thursday, April 30, 2009 9:30 AM
  • Could you please start an additional posting because this is a different problem?

    Thank you and best regards,
    Jürgen
    Jürgen Beck

    Dipl. Kfm./Wirtschaftsinformatik
    MVP, MCSD.NET, MCITP DBA, MCDBA, MCSE
    Microsoft Certified Business Management Solutions Professional
    Microsoft Certified CRM Developer
    Microsoft Certified Trainer

    ComBeck IT Services & Business Solutions
    Microsoft Gold Certified Partner
    Microsoft Small Business Specialist

    Developing & Supporting Business Applications from small business to big enterprises covering scores of sectors

    http://www.combeck.de
    Thursday, April 30, 2009 9:31 AM
    Moderator