If I have an existing custom field where there are some duplicate values across records, but which should ideally be a unique key, is it possible to make it unique? If so, what happens to the existing records with duplicate values?


You won't be allowed to complete the modification. All values must already be unique or null before imposing a unique index. You'll get an error like the following:

Error: Duplicate value(s) found when building unique index, example: ...

You must first clean up the duplicate values before you'll be allowed to make an index.

  • Well sheeeit. If some of those records are leads that have already been converted then I'm just out of luck, huh? – OBerm Jul 20 '15 at 21:35
  • 3
    There's a jam, for sure. Probably would involve deleting those old leads, or perhaps making a new field, making it unique, then using the data loader to copy what values you can. – sfdcfox Jul 20 '15 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.