Sep 26, 2019 in Salesforce
Q: How to invoke batch apex job (or) how to execute the batch apex job programmatically in Salesforce?

1 Answer

0 votes
Sep 27, 2019

We can use database.executebatch ( ) method to programmatically begin the batch job.

Syntax:

Public static ID execute batch ( sObject class name)

Public static ID execute batch (sObject class name, integers scope)

The above two methods are static methods of database class. We can use any one of the methods to execute the batch job.

Note: The class name what we are passing to the database.execute batch( ) method should be object of the class which has implemented database.batchable interface.

Related questions

0 votes
Sep 24, 2019 in Salesforce
0 votes
Sep 24, 2019 in Salesforce
...