InterviewSolution
| 1. |
How To Invoke Batch Apex Job (or) How To Execute The Batch Apex Job Programatically? |
|
Answer» 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, INTEGES SCOPE) The above two methods are static methods of database class. We can use any one of the method to execute the batch job. 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, integes scope) The above two methods are static methods of database class. We can use any one of the method to execute the batch job. |
|