For upsert action in Salesforce, if the key field is not an External ID, you may encounter:
"UPSERT requires the external ID field to be specified"
This error occurs because Salesforce's upsert operation relies on an External ID to determine whether to insert a new record or update an existing one. Without an External ID, Salesforce cannot perform this match.
Additional Notes:
- If the field is not unique, you may encounter a DUPLICATE_EXTERNAL_ID error if multiple records match the same value during an upsert.
- Auto-number fields cannot be used as External IDs
Once you select Action = Upsert in Salesforce Inspector, you need to enter the External ID
Similarly, if you are using Workbench, you can select the External Id field from the selected object, as shown in the screenshot below; the Id and Name fields can be used as the External Id field by default.
No comments:
Post a Comment