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
SFDC ROCKSFDC ROCK 

How can we track failed records in batch apex?

How can we track failed records in batch apex? suppose we are updating 100000 records out of that 20000 records are failed so again I want to update only failed records.How can we achieve this?

Thanks
Best Answer chosen by SFDC ROCK

All Answers

Ahmed Ansari 13Ahmed Ansari 13
This was selected as the best answer
@anilbathula@@anilbathula@
Hi Subodh,

The best option is sending and email with the failed records to your email on finish methods.
Later you can fix the data issues and upload them by data loader .
https://www.forcetalks.com/salesforce-topic/how-to-handle-error-records-in-salesforce-batch-apex/

Thanks
Anil.B