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
THUNDER CLOUDTHUNDER CLOUD 

How to execute a particular batch records that has not execute ?

While performing DML operations on batch of records, when a particular batch execution failed. How to execute that particular batch records ?
Harish RamachandruniHarish Ramachandruni

From Developer Console:
1. Click Debug -> Open Execute Anonymous Window
2. Execute the following  code 
1Id <variable name>= Database.executeBatch(new <Class name>(), batch size);
For example:  
1Id batchJobId = Database.executeBatch(new RunThisBatch(), 200);


Regards,
Harish.R
SalesFORCE_enFORCErSalesFORCE_enFORCEr
Use Database.SaveResult[] SR = Database.update(accs, False); and then getErrors() to get the failures and put them in a list/map. Then you can try to apply DML on thr failures only.