Categories

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

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.

Click here to read more about Salesforce
Click here to read more about Insurance

Related questions

Madanswer
Sep 24, 2019 in Salesforce
Sep 24, 2019 in Salesforce
Sep 24, 2019 in Salesforce
...