-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathDeleteData.apxc
31 lines (27 loc) · 1.2 KB
/
DeleteData.apxc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
public class DeleteData {
public static void deleteData(){
List<Car__c> cars = [SELECT Id FROM Car__c];
delete cars;
List<Car_Type__c> carTypes = [SELECT Id FROM Car_Type__c];
delete carTypes;
List<String> emails = new List<String>();
emails.add('[email protected]');
emails.add('[email protected]');
emails.add('[email protected]');
emails.add('[email protected]');
emails.add('[email protected]');
emails.add('[email protected]');
emails.add('[email protected]');
emails.add('[email protected]');
emails.add('[email protected]');
emails.add('[email protected]');
emails.add('[email protected]');
emails.add('[email protected]');
emails.add('[email protected]');
emails.add('[email protected]');
List<Contact> contacts = [SELECT Id FROM Contact WHERE Email IN:emails];
delete contacts;
List<Account> acc = [SELECT Id FROM Account WHERE Name='Lightning Training'];
delete acc;
}
}