I send next upsert request to Salesforce:
PATCH /services/data/v41.0/sobjects/Task/uuid__c/a22ac4d6-e2c0-4e53-898d-ea1d0c807775 HTTP/1.1
Host: **********.my.salesforce.com
Content-Type: application/json; charset=UTF-8
Accept: application/json
Authorization: Bearer *******
{
"Description": "Called C to discuss the reinstall.",
"CallType": "Outbound",
"OwnerId": "************",
"Status": "Completed",
"Subject": "Call",
"isTransfer__c": false,
"WhatId": "************",
"CallDurationInSeconds": 597,
"AudioFile__c": "outgoing/2017-10-31/03-10-59_ID-***********.mp3",
"CallStarted__c": "2017-10-31T07:10:51Z",
"CallHangup__c": "2017-10-31T07:20:56Z",
"AsteriskId__c": "7794786",
"ReasonText__c": "Success call"
}
uuid__c
field is Unique
, Case Insensitive
and external id
marked.
I receive next response from Salesforce:
[
{
"message": "duplicate value found: uuid__c duplicates value on record with id: *******************",
"errorCode": "DUPLICATE_VALUE",
"fields": []
}
]
How it can be if UPSERT request must update object when duplicate found?
I have used this documentation for developing: Insert or Update (Upsert) a Record Using an External ID
uuid__c
of the record mentioned on the error match theuuid__c
of your request?