function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pradeep Pradhan 21Pradeep Pradhan 21 

Write an apex program, to insert 400 Contact Records inside the object.

CharuDuttCharuDutt
Hii Pradeep
Try Below Code And Execute in Anonymous Window
list<Contact> InsertContacts = new list<Contact>();
	for(integer i=0;i<=400;i++){
	contact con = new contact ();
		Con.FirstName = 'Test';
		Con.LastName = 'Contact'+String.ValueOf(i);
		//FIll All Required Fields
		InsertContacts.Add(Con);
	}

	If(InsertContacts.Size()>0){
		insert InsertContacts;
	}
Please Mark It As Best Answer If It Helps
Thank You!