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
skodisanaskodisana 

Too many DML Rows

Hi,

 

I have one apex class which is invoked from the Cron kit trigger. In my class i am updating records using two different lists, each list is having 60 records. Both updation are consider as separate DML statement but the records in the List are appending and it is throwing Too many DML rows 120. Even though i am having two different list why it is giving error.

 

Please  suggest me on this.

 

Thanks & Regards

Srikanth.K

 

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
aalbertaalbert

If the apex trigger was initiated with only 1 record, the calculation of the runtime governor limits will only allow a max of 100 records to be processed through DML statements. More information here

 

You could move the DML operations into a method with the @future annotation to let the code run asynchronously and also obtain higher governor limits.