+1 vote
in Salesforce by
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.

Related questions

+1 vote
asked Sep 24, 2019 in Salesforce by Robin
+1 vote
asked Sep 24, 2019 in Salesforce by Robin
...