Skip to main content
Seesaw Bot ha preguntado en #Integration
We import an external database into Salesforce accounts on a nightly basis. Many accounts are created by hand and given one of several unique IDs that our nightly job will then update.

We used the REST/Bulk API's error messages regarding duplicated unique constraints to try to do this.

For example, we try to upsert some Account ⌗12345 that has external ID 2222 and a second unique field 4444. There already exists an account with unique field 4444, but not external ID 2222 (the creator of the account knew the second unique field but not the external ID when creating the account).

When doing the upsert, as no account exists with external ID 2222, Salesforce tries to create the account, but that fails the uniqueness constraint 4444. So upon seeing the error message, we perform an update request on the account with second unique field 4444.

Before 8/31, Salesforce would provide an error message like:

Error: duplicate value found: Custom_Field__c duplicates value on record with id: 123456

Now, any attempts to upsert an Account with a failed unique constraint shows:

Error: duplicate value found: <unknown> duplicates value on record with id: <unknown>

This is not easily actionable. Nothing has changed in the nightly job, and no one seems to know of any changes to the org that could cause this. Any ideas on how we can ensure we recieve those more detailed error messages when we violate uniqueness constraints as part of an upsert?

 
2 respuestas
  1. 5 sept 2018, 16:48
    Thank you for your suggestion! However, we disabled all duplicate rules and we're still encountering the ambiguous error message.
0/9000