Loading

Error 'Duplicate value found when building unique index' on field set up as ‘Unique’

Publiceringsdatum: Oct 13, 2022
Beskrivning

When attempting to mark a field as Unique, Salesforce builds an index for that field. If the unique index contains duplicate values (e.g. if there are multiple existing records which have the same value in the field we are trying to make unique), then the operation will fail and the Unique attribute will not be set.

Lösning

To address this:
  • Ensure that no two records contain the same value in the field being set as unique.
  • All existing records must have unique values, or no value at all, in the field.  This includes records in the Recycle Bin. Set the Unique attribute once these steps have been confirmed.



See also:
View, Restore, and Manage the Recycle Bin in Salesforce Classic
Custom Field Attributes

Knowledge-artikelnummer

000385434

 
Laddar
Salesforce Help | Article