Free Salesforce Developers Tutorials >

Chapter 12 - Governor Limits and Batch Apex >

Execute Batch Class in APEX

Execute Batch Class in APEX

S2 Labs

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

Download Study Material

Get access to exclusive study material for Salesforce Certification and ace your exams!

Download Now

Our Salesforce Certification Courses

Hey there! Glad you made it through our Salesforce Developer Training for beginners . But wait! We've got some high-in-demand Salesforce courses for you to take your Salesforce skills to the next level, making you a desired professional in the Salesforce job market.

Post a Comment

Your email address will not be published. Required fields are marked *