How do I delete more than one record at a time in salesforce?
Delete all Salesforce Account objects (up to the artificially imposed limitations per SF query on whatever the object happens to be):
delete new List<Account>([select Id from Account]);
Where "Account" is any Salesforce object (or custom object you've created). You can fine-tune the delete by adding the "WHERE" clause:
delete new List<Account>([select Id from Account where ... ])
Or the "LIKE" clause:
delete new List<Account>([select Id from Account where LastName like 'Jon%']);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With