+ Start a Discussion
Shubham MirketaShubham Mirketa 

Is there a limit on list size if I pass the list in the constructor of a batch class and schedule it?

I have made a batch class which is executed from my controller. A static list of record ids is getting passed to the batch class constructor. If i run the batch directly from the controller, it is working fine. But if i schedule the batch class for future runs, it is starting but not getting further executed. It throws an error in the debug logs- id list size greater than 100. This error is not thrown if i execute the batch directly even if the list size exceeds 100. Any solution or suggestions?
NagendraNagendra (Salesforce Developers) 
Hi Shubham Mirketa,

Please include the error text verbatim and the code that throws it. The only limit in the batch should be heap size, which would be significantly more than 100 Ids.

Please let us know if this helps.

Regards,
Nagendra.