My_Test_Repo/force-app/main/default/classes/deleteLeadJob.cls

15 lines
433 B
OpenEdge ABL

global class deleteLeadJob implements Database.Batchable<sObject>{
global Database.QueryLocator start(Database.BatchableContext BC)
{
return DataBase.getQueryLocator([SELECT Id FROM Lead WHERE Status = 'Closed - Not Converted']);
}
global void execute(DataBase.BatchableContext BC, List<Lead> Scope){
delete Scope;
}
global void finish(DataBase.BatchableContext BC){
}
}