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
VSK98VSK98 

Can we insert more than 50K records?

Hi All,

Can we Insert more than 50K account records in trigger. If possible, please expalin with small snippet code.

Regards,
VSK98
Best Answer chosen by VSK98
Sagar PatilSagar Patil
Hi VSK98,

As per the Salesforce governor limit,

Total number of records processed as a result of DML statements = 10,000 and
Total number of DML statements issued = 150

So we can insert upto 150 * 10,000 record in one transaction.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm

Hope this helps!
Kindly mark this as best answer if it helps you.

Regards,
Sagar