I have NPSP v3 set up in Salesforce and am using the REST API to create a contact record. I am inserting fields [FirstName], [LastName], [Email], [Phone], [MailingState], [MailingPostalCode], [RecordTypeId] only.
It works fine but I have a case that is throwing the error
Error: call to URL https://axysau.my.salesforce.com/services/data/v20.0/sobjects/Contact/ failed with status 400, response [{"message":"Failed to create Account for Contact FIRSTNAME LASTNAME. You are creating a duplicate record. We recommend you use an existing record instead.","errorCode":"FIELD_CUSTOM_VALIDATION_EXCEPTION","fields":[]}], curl_error , curl_errno 0
It is failing for a case where the contact is already in Salesforce with a different email address. I have checked validation rules on Account
, Contact
and npsp__Address__c
but none of them have any. I also checked 'Household Account Addresses Disabled' in NPSP Settings->People->Addresses. I still get the same error.
So I changed the postal code for that contact before its created with the API and it has successfully created the Contact & Account for them.
Where can I change settings so that contact with the same firstname, lastname & postal code as someone already in Salesforce doesn't block me from creating a new Contact & Account record for them? No doubt I will get the same people using a different email address, or different people with the same name living in the same suburb. I want it to create a new record in all cases.