+ Start a Discussion
Navin KNavin K 

Duplicate value found: unknown duplicates value on record with id

Dear all,

We have an integration of Eloqua with Salesforce and when pushing contacts from Eloqua to SalesForce as leads, following error messages are triggered"

Message 1: Duplicate value found: unknown duplicates value on record with id: ---------------------
Message 2: Too many retries of batch save in the presence of Apex triggers with failures: when triggers are present partial save requires that some subset of rows save without any errors in order to avoid inconsistent side effects from those triggers. Number of retries: 2

Any thoughts on how to resolve these errors ?

Individual contacts can be pushed from Eloqua and the external calls are successful (leads are created successfully). Above mentioned errors are triggered when I try to push more than 30 contact records.

A few forums suggested turning off the History tracking of Lead fields that I have already due, but the error is persistent.

https://success.salesforce.com/issues_view?id=a1p30000000T2URAA0



Thanks very in advance for any help,

Navin Krishnan
Prem_PalPrem_Pal
I think the records that you are pushing contain some duplicate records.

Please try to add them in a set first and then try to insert them.

Message 2 is an error which comes when you try to perform bulk DML using SOAP API and the runtime engine fails 2 times to insert your records.

Solving first error will resolve your problem.

Thanks,
Prem


Navin KNavin K
Hi Prem, Many thanks for your input.

It looks like the Lead ID field is set as Unique and that was causing the issue. Removed the unique flag and the contacts flow in SFDC and lead is created without any issues.

Best Regards,
Navin
Prem_PalPrem_Pal
Glad I could help!

You can mark this thread as solved if your issue is resolved :-)
PRIYAN NEERUDUPRIYAN NEERUDU
trigger CONUP on Contact (after update,after insert) {
    Map<Id, Decimal> acctIdToAmount = new Map<Id, Decimal>();
    List<Account> accountsToUpdate = new List<Account>();
    Map<ID,RecordType> typeMap = New Map<ID,RecordType>([Select ID, DeveloperName From RecordType Where sObjectType = 'CONTACT']);
    for (CONTACT CON : trigger.new) {
          // If the Record Type = Intake Form
          if (typeMap.get(CON.RecordTypeId).DeveloperName == 'C2B' || typeMap.get(CON.RecordTypeId).DeveloperName == 'D2B') {
            //    Get the Contact Amount into a temp variable
            Decimal sum = CON.PAID_AMOUNT__c == null ? 0 : CON.PAID_AMOUNT__c;
            //    Sum it up with the already collected Amount    
            if(acctIdToAmount.containsKey(CON.AccountId))
                sum += acctIdToAmount.get(CON.AccountId); 
            
            //    Make a map with AccountId as Key and Amount as value     
             acctIdToAmount.put(CON.AccountId, sum);
          }
          else if(typeMap.get(CON.RecordTypeId).DeveloperName == 'E2B') {
              Decimal sum = 0;

            if(acctIdToAmount.containsKey(CON.AccountId))
                sum = acctIdToAmount.get(CON.AccountId);

            sum -= CON.PAID_AMOUNT__c == null ? 0 : CON.PAID_AMOUNT__c; 
                 
             acctIdToAmount.put(CON.AccountId, sum);    
          }      
    }

    for(Id accId : acctIdToAmount.keyset()) {
        Account acc;
        if(acctIdToAmount.get(accId) >= 0)
               acc = new Account(Id = accId, TOTAL_AMOUNT__c = acctIdToAmount.get(accId));
        else
               acc = new Account(Id = accId, PENDING_AMOUNT__c = acctIdToAmount.get(accId));
        accountsToUpdate.add(acc);
    }

    if(!accountsToUpdate.isEmpty())
        update accountsToUpdate;
}



mactualu using the above code ....and the error is:duplicate value found: <unknown> duplicates value on record with id: <unknown>......can i get the code rectified ....to slove this issue
mark lee 46mark lee 46
A few forums suggested turning off the History tracking of Lead fields that I have already due, but the error is persistent.
https://success.salesforce.com/issues_view?id=a1p30000000T2URAA0 my error is solved You can check free fire here. (https://www.freefirepc.com/)
Grant_WilsonGrant_Wilson
Darren Lees suggests a more complicated idea though. On his blog - Salesforce projects scross service cloud and joined the Marketing Cloud Email and Social Specialist maintenance exams.
Quite understandable solutions mentioned on Stackexchange. How to debug the mysterious “duplicate value found: <unknown> duplicates value on record with (https://salesforce.stackexchange.com/questions/79799/how-to-debug-the-mysterious-duplicate-value-found-unknown-duplicates-value-o) blog solution (http://buyessays.cheap) <unknown>” error (https://stackoverflow.com/questions/24566904/error-unknown-duplicates-value-on-record-with-id)
Sandra Smith 3Sandra Smith 3
Even I was facing this issue thank you now it's fixed 😊 (https://techcrucial.com)
Raj Pandey 20Raj Pandey 20
Earlier I was also facing this problem, but from my end it's ok. 

Can you plz it's fine or not in your side (https://skytechblog.com)
Jack CyrusJack Cyrus
I was also stuck with the same problem and wasted a lot of time but finally, now it's fixed. Thanks for the share. ( https://www.2twinz.com )
Lesdolf KingLesdolf King
Thanks for sharing this helpful blog with me. I fixed my errors with the help of you. You can my site pubg lite pc (https://pubglitepc.com/)
neha patel 38neha patel 38
I am also facing the same issue and wase my lot of time. now it's fixed(http://thetechyinfo.com/
Finance GradeupFinance Gradeup
Yes i was also got solved by this forum thread.: https://financegradeup.com/
Papia NagPapia Nag
Firstly I was having some problems with the method. After checking again I found that I had mistyped the code. Now I can easily move my contacts to my website (https://www.thesharedweb.com). Thanks a lot
Amit BhistAmit Bhist
After, lot of attemps, finally i manage to solve this issue for my website (https://www.yolobus.in/)
Pavan Mishra 5Pavan Mishra 5
That's not true exactly. I was facing this weird issue on my MacBook and got the solution from https://techbrane.com
Madduu MadduMadduu Maddu
I have a problem, I got very addicted to the game PUBG pc lite (https://www.pubgpclite.com/pubg-pc-lite/).
Xolani CeleXolani Cele
Glad most people who had the same issue including my website audiovisuallab.co.za (https://audiovisuallab.co.za/) got it fixed. Much appreciate. 
Xolani Cele 1Xolani Cele 1
Good to see people helping here, I also had a bud on my website audiovisuallab.co.za (https://images.google.com.bz/url?q=https://audiovisuallab.co.za/video-production-company/)
 
Steve AlviSteve Alvi
Firstly I was having some problems with the method. After checking again I found that I had mistyped the code. Now I can easily move my contacts to my website (https://www.tricksfly.com/). Thanks a lot
Steve AlviSteve Alvi
ALso you can join my Whatsapp Group (https://www.tricksfly.com/whatsapp-group-link/)
Jofry JosephJofry Joseph
An indian royale battle game is building under Akshay kumar mentorship called FAU-G if you want to download or know information about the game jump here (https://faugupdates.com/download-and-install-fau-g-game/)
junaid kandijunaid kandi
An indian royale battle game is building under Akshay kumar mentorship called FAU-G if you want to download or know information about the game jump here (https://monitorsell.com/best-27-inch-monitor-under-200/)
Shubham Maurya 7Shubham Maurya 7
It fixed my errors which I was facing in my WordPress page (PUBG Mobile India Apk Download Link). When I used W3Cvalidator, I found that the page was containing more than 2 id with the same name. Thanks for sharing the article
daniel hunterdaniel hunter
I actually dont know how to bt, I know how to buy John Deere 2025R Tractor (https://tractordir.com/john-deere-2025r-tractor-tough-as-nails-but-great-for-work/). check the page.
Yash Raj 6Yash Raj 6
Got the same issue but it's fixed now. Thank you guys for this information (ImagesQueen.com )