• Dimitri Shatovkin 1
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi,

I have a strange situation here.

 

I have written a web service class which searches for MemberID (which is unique) in Accounts, if its found then it updates that record OR else it inserts new record. The values for each fields in Accounts are supplied as a XML string parameter from Java. So the Java program calls this web service methods by passing XML strings.

 

All works well when tested with some static inputs, however when this method called in bulk, I get he error - 

Insert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: Member_ID__c duplicates value on record with id: 0019000000CZC83: []

 

I have no clue why and how could this happen? As I am searching for Member_ID__c in my query then inserting if its not found. As an additional step, I replaced 'insert' by 'upsert', still I am getting this exception.