adspace
How to invoke batch apex job (or) how to execute the batch apex job programatically?
Answer Posted / Rajnath Kumar
"To invoke a Batch Apex Job programmatically, you can use the Database.executeBatch() method. Here's an example:
1. Create an instance of your Batch Apex class.
2. Pass an Iterable<SObject> list to the start method in the constructor of the Batch Apex class instance.
3. Call Database.executeBatch() on the AsyncApexJob object, passing your Batch Apex instance as a parameter."
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers