Execute Batch Class in APEX
How To Execute Batch Class In Apex?
Now, To execute the batch class, we need to use Database.executeBatch() method.
Below is the example code to execute the batch class in Apex.
// Create object of Batch Class
LeadUpdateBatch lUBatch = new LeadUpdateBatch();
// execute batch with chunk size 200
Database.executeBatch(lUBatch, 200);
Check out the video to understand and know how to write code in order to execute the batch class in Apex.
Join our newsletter: Get daily update on Salesforce career insights & news!
Join Now!
Need more support?
Get a head start with our FREE study notes!
Learn more and get all the answers you need at zero cost. Improve your skills using our detailed notes prepared by industry experts to help you excel.