You need to sign in to do that
Don't have an account?
How to generate a string with a list of skipped record ids
How to generate a string with a list of skipped record ids.
Here I am skipping the records for which there is no matching count__c.
I need to concatinate a string (skippedRecords) with ids of those skipped records. How would I achive this?
Here I am skipping the records for which there is no matching count__c.
I need to concatinate a string (skippedRecords) with ids of those skipped records. How would I achive this?
List<Parent__c> parentList = [SELECT Id, Name,downloads__c FROM Parent__c WHERE count__c IN :countList]; List<Data__c > datatoupdate = new List<Data__c >(); String skippedRecords = ''; for(Data__c dRecords : dList) { for(Parent__c parentRecords : parentList) { if(dRecords.count__c == parentRecords.count__c) { dRecords.downloads__c = parentRecords.downloads__c ; datatoupdate.add(dRecords ); } } } update datatoupdate;
All Answers
Please find the below piece of code to add the records which are getting skipped by adding to the string.
if this solution helps, Please mark it as best answer.
Thanks,