E2120 Duplicate External Id

The DUPLICATE_EXTERNAL_ID error in Salesforce occurs when you try to insert or update a record with an External ID field that must be unique, but the value you’re providing already exists in another record. If a field is marked as an External ID and is also marked as Unique, Salesforce enforces uniqueness. When using upsert, Salesforce checks for a match based on the External ID. If multiple records already exist with the same External ID, Salesforce doesn’t know which one to update, causing this error.

SF_ERROR: DUPLICATE_EXTERNAL_ID OBJ: Product2 - Case SKU Number (US): more than one record found for external id field: [01tj00000033KNPAA2, 01tj0000002xwceAAA] FIELDS: Field_Source__C. 

This is a Salesforce restriction. Salesforce will not allow multiple records with the same External ID to be created. So the records with duplicate external IDs need to be checked and adjusted accordingly. 

Solution:

  • Check that specific record in your source system and make sure that it has an unique Id; If you have duplicates in your source system, you would need to clean the data and then transfer them to Salesforce. 
  • Also, check this particular record in Salesforce as well - sometimes, users can create duplicate data directly in Salesforce and therefore causing further issues for the ongoing integration.