Learn from industry experts! Admin batch starts from 19 Feb.
Hurry up!
Book your slot now!

12

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.

Salesforce certifications
Next Topic

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.

Book A 15-Minutes Free Career Counselling Today!