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
Maqsood AhmadMaqsood Ahmad 

duplicate value found: unknown duplicates value on record with id

duplicate value found: unknown duplicates value on record with id

I'm upserting an existing record by following https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_upsert.htm
and I'm getting error "duplicate value found: unknown duplicates value on record with id"
When I upsert new record it does create new record when I try to update same record through upsert I get above error.
Theoritaclly it should work as that's the purpse of upsert.

I need to use this upsert technique so that I can create/update multiple records through this technique.
I'm following this technique to upsert existing record

Any help to resove this issue??
Arvind KumarArvind Kumar

Hi Ahmad,

Make sure your external id is unique and in the data you are getting the field which is mapped to external id does not have repeated values.

Please cross check again your records sheet.

Thanks,
Arvind Kumar

Arvind KumarArvind Kumar
Hi Ahmad,

You should follow the below link for upserting records in the org. It will do help you.

https://douglascayers.com/2016/02/07/salesforce-power-of-upsert-and-external-ids-part-2/

Thanks,
Arvind Kumar
Maqsood AhmadMaqsood Ahmad
Hi Arvind

Thanks for your reply.
External id is already unique and the data I'm getting in doens't have any repeated values. In fact I'm upserting only one record and not more then one reocrds for my initial test. As I'm writing code in C# to upsert this record by following https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_upsert.htm
I'm stuck in this and not sure why I'm getting this exception.User-added image
Narasimha Reddy 141Narasimha Reddy 141
Please let me know if any one is facing the below issue----"When duplicate value found  ( id is unique)while upserting data via dataimport wizard" can we up update campaign field values ?if yes how it can be ?