USER STORY
As a Salesforce Administrator, I want to be able to generate and insert 10 contact records into our Salesforce organization with random American first names and last names, so that we can have a diverse set of contacts for testing and demonstration purposes.
EXPECTED OUTCOME
10 Contacts will be created in CRM
SOLUTION
List<Contact> contactList = new List<Contact>();
String[] firstNames = new String[]{'John', 'Jane', 'Michael', 'Emily', 'David', 'Sarah', 'William', 'Olivia', 'James', 'Ava'};
String[] lastNames = new String[]{'Smith', 'Johnson', 'Brown', 'Davis', 'Miller', 'Wilson', 'Moore', 'Taylor', 'Anderson', 'Thomas'};
for (Integer i = 0; i < 10; i++) {
Contact newContact = new Contact();
newContact.FirstName = firstNames[i];
newContact.LastName = lastNames[i];
contactList.add(newContact);
}
insert contactList;
Video
Video does not exists.