Salesforce offers a way to upsert a record by a given External Id:
curl https://na1.salesforce.com/services/data/v20.0/sobjects/Account/customExtIdField__c/11999 -H "Authorization: Bearer token" -H "Content-Type: application/json" -d @newrecord.json -X PATCH
But if it doesn't find an Account with customExtIdField__c
equaling to 11999
, it will create a new record instead.
Is there a way to restrict the operation to only perform updates if a relevant record already exists, and throw an exception when it doesn't?