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
Guru@SfCloudGuru@SfCloud 

Can any one suggest me How to make the Schedule class Stateless

Hi All,

Right now I have a trigger on Opportunity, from the trigger I am calling the schedule class.
My concern is when I upload the opportunitties more than 100 it is throwing the error like Too many SOQL queries.
In my Trigger I am using the Iterator(Some where i red that iterator is an statefull protocol),so it is causing to fire class more than 100 times(Limit is 100 schedule jobs per day).

So anybody please suggest me how tom make the Schedule class as Stateless one....

If any one Help would be greatly appriciated.

Thanks,
Gurunath Jinka
Deepak Kumar ShyoranDeepak Kumar Shyoran
Please visit this link there same type of problem mentioed here https://developer.salesforce.com/forums/ForumsMain?id=906F00000008zJ5IAI

Hope it will help you to solve your problem.
Guru@SfCloudGuru@SfCloud
Hi Deepak,

Thanks for your response ,however I am not able to find the solution by using your suggested link.

Here what the problem is I need to do the schedule class as a stateless and the one which you sent(link) is for Batch class.

can you please suggest me to find the solution ..it's an urgent ...

Thanks in advance

Gurunath jinka