function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
prashanth murukondaprashanth murukonda 

BATCH JOBS

I want to run Job3 after Job1.How can we do this in Batch Apex?
Amit Chaudhary 8Amit Chaudhary 8
Please check below post for batch job related information
1) http://amitsalesforce.blogspot.in/2016/02/batch-apex-in-salesforce-test-class-for.html
 
global class Job3 implements Database.Batchable<sObject> 
{
    global Database.QueryLocator start(Database.BatchableContext BC) 
    {
..............you logoic
    }
    global void execute(Database.BatchableContext BC, List<Account> scope) 
    {
..... your logic
    }
    global void finish(Database.BatchableContext BC) 
    {
    // call you job1 from finish method
            Job1 obj = new Job1();
            DataBase.executeBatch(obj); 
    }
}

// call you job1 from finish method

Let us know if this will help you