Activity Forums Salesforce® Discussions How to Invoke Batch Class in Salesforce?

  • Piyush

    August 8, 2019 at 10:18 am

    Hi Achintya,

    We can use database.executebatch ( ) method to programmatically begin the batch job.


    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.

  • Saddam

    August 9, 2019 at 6:01 am

    1) Go to Setup --> Open Developer Console.
    2) Select "Debug" tab --> Open Execute Anonymous Window
    3) In this window, type Database.executeBatch(new NameofBatchClass());

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos