in Salesforce by
Q:
How to invoke batch apex job (or) how to execute the batch apex job programmatically in Salesforce?

1 Answer

0 votes
by

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

0 votes
asked Sep 24, 2019 in Salesforce by Robin
0 votes
asked Sep 24, 2019 in Salesforce by Robin
0 votes
asked Sep 24, 2019 in Salesforce by Robin
0 votes
asked Sep 26, 2019 in Salesforce by Robin
0 votes
asked Feb 3, 2020 in Salesforce by SakshiSharma
...