function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Myles Grossblatt 9Myles Grossblatt 9 

Error Message

I have received the below message when I tried to upload a Batch:

Database.Error[getFields=();getMessage=rC_Bios.Contact_AfterUpdate: execution of AfterUpdate caused by: System.ListException: Before Insert or Upsert list must not have two identically equal elements (rC_Bios) ;getStatusCode=CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY;]): method = updateContact

What is the best way to resolve this error message?

Thank you!


sounds like a trigger issue where there is a list of sObjects that get updated which is populated with two identical elements. 
Its in the updatedContact method on the rC_Bios trigger by the looks of it. Could you post the code? It would be easier to identify the issue.
Myles GrossblattMyles Grossblatt
Where can I find the code?

Well that depends on the code structure in the org. A good place to start would be to find the triggers for the related objects in the developer console. In developer console go to File -> Open and select "Triggers" on the entity types. Then open the relevant entity file.
Myles GrossblattMyles Grossblatt
Unfortunately, I do not have access to that, as this is in our production.