1

I have an External Id on Account object.

Is there a way to make an upsert when 2 records or more have the same external Id BUT they have different record type?

When I make the upsert I get the following errror :

more than one record found for external id field

The filed is checked only for externalId - and not for unique.

I'm making the upsert using DataLoader.

3

Is there a way to make an upsert when 2 records or more have the same external Id BUT they have different record type?

Unfortunately not. The values within that one field need to be unique for upsert to work. It might be a concatenation of both record type and the rest of the unique ID, etc, depending on your situation, but you will need to modify that data offline.

  • Out of curiosity, Can there be any practical use of External ID if it's not unique? – Pranay Jaiswal Dec 19 '18 at 11:25
  • That a great Idea to do. Thanks @sfdcfox – Salvation Dec 19 '18 at 11:28
  • 1
    @PranayJaiswal You can use External ID as a performance enhancer for queries that filter on that field, since it adds an index if there isn't one already, but otherwise non-unique IDs are pretty useless. – sfdcfox Dec 19 '18 at 11:28

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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