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.

1 Answer 1

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.

3
  • Out of curiosity, Can there be any practical use of External ID if it's not unique? Commented Dec 19, 2018 at 11:25
  • 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
    Commented Dec 19, 2018 at 11:28
  • Old question, but it can happen when you have a custom object that can host Countries and States, with different record types. They may have the same Code for the location itself... You need to create a new object or a new externalid concating the code+type. Commented Mar 17, 2023 at 14:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .