Loading

Salesforce Error 'Duplicate value found: uuid__c duplicates value on record with id: 00XXXXXXXXXXXXX' on Patch Operation

게시 일자: Oct 27, 2025
상세 설명

If you send continuous REST API calls to Salesforce using languages such as node.js or JavaScript, you may sometimes face the below error with PATCH call through REST using an external Id field which accepts only unique values.

Error: "duplicate value found: uuid__c duplicates value on record with id: 00XXXXXXXXXXXXX".

You may wonder why you are getting duplicate error while you are doing a patch operation, which should either update the existing records or insert a new record?

The error itself does have some helpful information in that you are sending a duplicate record while the other is already present/being processed.

The scenario might be as follows: 

Since multiple requests are being sent, there might be an overlapping request. That is, if the same record has been sent simultaneously/with milliseconds or seconds of a gap, it might be possible that the first records is under process while the second record is again taken up for processing. Then the server finds the second record as a duplicate and throws the error.

솔루션

The best possible solution for this scenario would be to synchronize the requests.

  • Make sure, only one record is present in a request/in a batch of requests.
  • While there is no time gap set by Salesforce as such between consecutive requests, it would be a good practice to program the requests in a way to have some seconds of time gap between two requests (if the same record is being sent multiple requests)
Knowledge 기사 번호

000383480

 
로드 중
Salesforce Help | Article