Reader small image

You're reading from  Salesforce Data Architect Certification Guide

Product typeBook
Published inNov 2022
PublisherPackt
ISBN-139781801813556
Edition1st Edition
Right arrow
Author (1)
Aaron Allport
Aaron Allport
author image
Aaron Allport

Aaron Allport is a Chief Technical Officer, and has worked with CRM systems and integrations for his entire professional career. Aaron specializes in Salesforce technical architecture and integration, helping his clients ensure they get the most from their technology investment. Aaron has spoken at Dreamforce, written about everything from DevOps to Data Architecture online, and can regularly be found at the Salesforce London Developer Meetup.
Read more about Aaron Allport

Right arrow

Batch Apex

As its name suggests, batch Apex is used to invoke and process a potentially large number of records in batches, where the number of records is determined by issuing a query to Salesforce. This execution typically lends itself well to situations where a potentially large number of records could need processing, yet the exact number of records isn’t known, such as updating records as part of an overnight batch procedure.

batch Apex classes must implement the Database.Batchable interface and therefore the start, execute, and finish methods. A bare-bones Apex class for implementing the Database.Batchable interface would look similar to the following:

public class myBatchClass implements Database.Batchable {
   public Database.QueryLocator start(Database.BatchableContext info){}
   public void execute(Database.BatchableContext info, List<sObject> scope){}
   public void finish(Database.BatchableContext...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Salesforce Data Architect Certification Guide
Published in: Nov 2022Publisher: PacktISBN-13: 9781801813556

Author (1)

author image
Aaron Allport

Aaron Allport is a Chief Technical Officer, and has worked with CRM systems and integrations for his entire professional career. Aaron specializes in Salesforce technical architecture and integration, helping his clients ensure they get the most from their technology investment. Aaron has spoken at Dreamforce, written about everything from DevOps to Data Architecture online, and can regularly be found at the Salesforce London Developer Meetup.
Read more about Aaron Allport