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
Balu_devBalu_dev 

""First error: Too many DML statements: 151""-- batch class.. Urgent, please provide solution..

I have a batch class that runs the update on account records. I get an error First error: Too many DML statements: 151..       I have only one update statement, but still i dont understand why it says...please give me your email id so that I can send the code as its bit a lengthy code..Any help appreciated....

craigmhcraigmh

Use the Code button (clipboard with the letter C) to paste the code here.

lakslaks

Hi,

 

Hope your DML statment is not inside any loop (for, while etc).

If so, you might get the same problem eventhough you have written only 1 update statement.

 

 

Regards,

Lakshmi.

UVUV

What number of records do you have for account????