Loading

Execute a Batch Apex from the Developer Console

Julkaisupäivä: Jun 14, 2024
Kuvaus

Execute batch Apex from the Developer console to create complex automated processing.

Ratkaisu

Run Batch Apex

  1. Open the Developer Console
  2. Click Debug | Open Execute Anonymous Window
  3. Execute the following code
Id <variable name>= Database.executeBatch(new <Class name>(), batch size);

Example code:

Id batchJobId = Database.executeBatch(new RunThisBatch(), 200);


Note: The Apex class should implement interface Database.Batchable. The variable batchJobId will contain the job Id of the batch.

To monitor or stop the execution of the batch Apex job: from Setup, enter Apex Jobs in the Quick Find box, then select Apex Jobs.

Knowledge-artikkelin numero

000385654

 
Ladataan
Salesforce Help | Article