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
Rakhesh TRakhesh T 

Is it possible to write a Batch Apex without Finish() method?

Is it possible to write a Batch Apex without Finish() method?

if yes, please explain.
UC InnovationUC Innovation
No, Apex requires that you implement the finish() method.  If you don't include it, it'll give an error and can't compile.  However, you can just implement the finish method as an empty function.
 
global void finish(Database.BatchableContext BC)  {

}