+ Start a Discussion
vamsi garapativamsi garapati 

How to insert records using batch apex?

ShirishaShirisha (Salesforce Developers) 
Hi Vamsi,

Greetings!

You can find the sample code provided in the below documents and make changes according to your business requirement.

https://www.sfdcpoint.com/salesforce/batch-apex-example-in-salesforce/

https://salesforce.stackexchange.com/questions/116785/how-to-create-thousands-of-records-using-batch-apex

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
vamsi garapativamsi garapati
@Shirisha Pathuri Thank you for your response. All those examples explain only how to update. I want records to insert through the batch apex.