You need to sign in to do that
Don't have an account?
Kittu Koppula
'System.LimitException: Too many code statements: 200001 ' exception in Winter 14
Hi,
One of my Sandbox instance is upgraded to Winter 14. As per Winter 14 release notes, 'Too many code statements' limitation is removed.
But still am getting the exception.
Thanks for your reply. I changed the version to 29.0. But still am getting the same exception.
Thanks,
Venkata Krishna Koppula.
Regards,
Satish Kumar
Regards,
Satish Kumar
We ran into this issue as well, and just to do a sanity check I ran the following code in the debug console:
That code produces the same error.
FYI, got this response from SFDC support:
"I had discussed this issue with R&D where they replied that the "Too many code statements" limit is still on until they work out the "CPU time limit error" that has started occurring in Winter'14."
Thanks,
Hi EJW,
Thanks for sharing salesforce.com response with us, Did they give any expected date or any time frame by which this will be resolved.
Unfortunately they didn't give any ETA. It's pretty rare when I can get an ETA so I don't really bother asking anymore. :) This is a rather major apex feature for Winter '14 so I'm assuming it'll be fixed by then but who knows. For now it's just business as usual with the limits.
Really looking forward to this though, it'll be so nice to write actual maintainable code for complex projects instead of using workarounds and hacks to stay within the limits as I have to currently. Many of those workarounds/hacks are actually more CPU intensive than doing things the proper way, so rewriting that code will probably give us a speed increase as well.
I probably have comments similar to this in 20-30 different places in my code: "God help me for doing this, it's terrible but we have to stay within the script limits."
The biggest change will be initializing properties in classes. Currently if I'm passing in initial values to a constructor I assign them to all the properties in a single line of code, as otherwise I get a script statement hit for each assignment and for the declaration of the properties when the class is instantiated. So I have classes that look like the following so I don't blow a ton of statements when I need to create 50 of them for some reason:
Memory optimizations have been a headache as well, 6MB is painful when working with multiple rows using long text fields or attachments. Ok, done rambling.