Skip to content

Instantly share code, notes, and snippets.

@durveshshah
Created March 12, 2024 21:56
Show Gist options
  • Save durveshshah/d3de6f8f4ade29ec6b78962037eb3d2c to your computer and use it in GitHub Desktop.
Save durveshshah/d3de6f8f4ade29ec6b78962037eb3d2c to your computer and use it in GitHub Desktop.
global class MyBatch implements Database.Batchable<sObject> {
global Database.QueryLocator start(Database.BatchableContext context) {
// Return query locator for data retrieval
}
global void execute(Database.BatchableContext context, List<sObject> scope) {
// Process batch of records
}
global void finish(Database.BatchableContext context) {
// Perform any post-processing tasks
}
}
// Start the batch job
Database.executeBatch(new MyBatch());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment