I am trying to update the account associated to a new Opportunity I am creating. I wrote a plugin to retrieve the account, update a field and then update the record. Problem is I get this error:
A record was not created or updated because a duplicate of the current record already exists.
It's being caused by the fact that I have a duplicate detection rule that sees another account that may be duplicate of the one I'm trying to update. So I found this parameter I could set on the UpdateRequest object to make it ignore duplicate detection called SuppressDuplicateDetection. Problem is even if I set it to true I still get the error. Here is the code I am using.
UpdateRequest reqUpdate = new UpdateRequest(); reqUpdate.Target = accountEntity; if (reqUpdate.Parameters.Contains("SuppressDuplicateDetection")) reqUpdate.Parameters["SuppressDuplicateDetection"] = true; else reqUpdate.Parameters.Add("SuppressDuplicateDetection", true); UpdateResponse updateReponse = (UpdateResponse)service.Execute(reqUpdate);
Based on my testing I can only assume that this parameter does not work. Has anyone else used this with any success?