I would like to insert a bunch of sample account records (50 or so), without using the data loader. I have written code, but I do not know how to proceed. Where can I run it?
List<string> firstList = new List<string>{'fast', 'lunar', 'modern', 'super', 'retro', 'traditional'};
List<string> secondList = new List<string>{'car', 'cat', 'mining', 'office', 'computer', 'ship'};
List<Account> accountsList = new List<account>();
for (String first: firstList){
for(string second: secondList) {
Account a = new Account();
a.Name = first + ' ' + second + ' co';
accountsList.add(a);
}
}
insert accountsList;
List<string> firstList = new List<string>{'fast', 'lunar', 'modern', 'super', 'retro', 'traditional'}; List<string> secondList = new List<string>{'car', 'cat', 'mining', 'office', 'computer', 'ship'}; List<Account> accountsList = new List<account>(); for (String first: firstList){ for(string second: secondList) { Account a = new Account(); a.Name = first + ' ' + second + ' co'; a.code__c = 'abc'; accountsList.add(a); } } insert accountsList;