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
Rajesh SriramuluRajesh Sriramulu 

Too many script statements: 200001

Hi

 

I Am getting this error because of for  loops , but when am trying to customize the for loops, my functionality is changing ,Please let me know there is any alternative solution for it.

 

Thanks in Advance.

pjcocopjcoco

You could try logging a case asking to up your script statements (via partner portal or your sales rep)

 

Also try not to do

for(Account a : accounts)
	a.Name = 'Updated'
	update a;
}

 

 

instead use:

for(Account a : accounts)
	a.Name = 'Updated'
}
update accounts; // the List in this case