+ Start a Discussion
Chandra Sekhar 28Chandra Sekhar 28 

Upsert operation failing in apex class

One of my batch class is failing throwing an exception message like
"System.DmlException: Upsert failed. First exception on row 0 with id 001G000000scGlxIAE; first error: DUPLICATE_VALUE, duplicate value found: AppUp_Group_ID__c duplicates value on record with id: 001G000000utTId:"

Let me know if there is any workaround to solve this?
IshwarIshwar
AppUp_Group_ID__c is unique field in your org. And, records having same values for this field are : 001G000000scGlxIAE and 001G000000utTId.

Data cleaning needed.
Chandra Sekhar 28Chandra Sekhar 28
Don't think that is the issue in this case. One record is having a balnk value for AppUp_Group_ID__c and other one with some number value present.