• akhil g 6
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
public class RandomContactFactory {
    public static List<contact> generaterandomcontacts(Integer numberofcontacts,string lastnames){
        List<contact> contacts = new List<contact>();
        for(integer i=0;i<numberofcontacts;i++){
            contact con = new contact(FirstName = 'Test'+i,Lastname = lastnames);
            contacts.add(con);
        }
        return contacts;
    }

}