1 个回答

Anyhow you need to call database.emptyrecyclebin() to delete your data permanently through Apex.You can take help of below Batch Class to delete your all account: global class BatchDeletion implements Database.Batchable<sObject>, Schedulable
{
global void execute(SchedulableContext sc)
{
BatchDeletion deleteCS = new BatchDeletion();
ID batchprocessid = Database.executeBatch(deleteCS, 200);
}
global Database.QueryLocator start(Database.BatchableContext bc)
{
return Database.getQueryLocator([Select id from Account]);
}
global void execute(Database.BatchableContext BC, list<sObject> scope){
delete scope;
DataBase.emptyRecycleBin(scope);
}
global void finish(Database.BatchableContext BC){}
}