You need to sign in to do that
Don't have an account?
Sumant Kuchipudi
Upsert Account failing with Duplicate error
I have created an external field in Account and have very simple code that upserts Account record.
below is the code
below is the code
Account a = new Account(); a.name='Testing 99test9911'; a.Account_External_Id__c='99test99'; upsert a;First time it creatd record but next time when I ran it failed (below is error), my environment is pretty much new (no triggers and no Workflows and no ProcessBuilders), I don't know how to fix this. Please advice
12:11:45:057 EXCEPTION_THROWN [4]|System.DmlException: Upsert failed. First exception on row 0; first error: DUPLICATE_VALUE, duplicate value found: Account_External_Id__c duplicates value on record with id: 0010t0000137DHM: []
Sumant Kuchipudi
I found the issue, need to use Account_External_Id__c in the upsert line ..
Thanks