
5 个回答
Hi Fred,Create one batch class and schedule it. every day or based on hours also.Sample code :
Hope this helps you!ThanksVaraprasad@For Support: varaprasad4sfdc@gmail.comBlog : http://salesforceprasad.blogspot.com/Global class BatchMassDeleteRecs Implements Database.batchable<sobject>{
global final string query = 'SELECt ID from APEXLOG';
global Database.QueryLocator start(Database.BatchableContext BC){
return Database.getQueryLocator('query');
}
global void execute(Database.BatchableContext BC,List<SObject> scope){
delete scope;
}
global void finish(Database.BatchableContext BC){
}
}