function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vivi 

Duplicate value found error occurs for insert of new record

Error Message:

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

Description of conditions causing this error:

I deleted a row (via saleforce tab) and then attempt to insert a new record (via API) that has the same value, for the unique field, as the deleted row.

 I have emptied the recycling bin.

vivi
I still get the error after setting the field to not be Unique.
 
Also, if I try to set the field back to being unique, I get this error:
 
Error: Duplicate value(s) found when building unique index, example: 7 on rows (_) and (_)
Mike LeachMike Leach
The duplicate value error looks unrelated to the records primary key. The API call to create likely has 2+ fields with a null, empty, or syntactically incorrect value.
 
Do you have any code to show?