O'Reilly logo

Development with the Force.com Platform: Building Business Applications in the Cloud, Third Edition by Jason Ouellette

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding the Batchable Interface

To make your Apex code run as a batch, you must sign a contract with the platform. This contract takes the form of an interface called Batchable that must be implemented by your code. It requires that you structure your processing logic into the following three methods:

Image startThe start method is concerned with the scope of work, the raw set of records to be processed in the batch. When a batch is submitted to Salesforce for processing, the first thing it does is invoke your start method. Your job here is to return a QueryLocator or an Iterable that describes the scope of the batch job.

executeAfter calling ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required