Delete Record(s) using Apex #inSalesforce
public class deleteRecords{
public static void deleteMethod(){
List<Account> alist = [Select id from Account where Active__c = false];
System.debug('!!!!size!!!!'+alist.size());
Database.delete(alist);
}
}
In anonymous window:
deleteRecords.deleteMethod()
Execute
Comments
Post a Comment