Loading

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

Fecha de publicación: Oct 13, 2022
Descripción

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.

Solución

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

Número del artículo de conocimiento

000385434

 
Cargando
Salesforce Help | Article