You need to sign in to do that
Don't have an account?
Attarid
Save Lists to session variable or view state
Hi,
Is there anyway to save lists to session variable or view state.
I am getting System.Exception: Too many SOQL queries: 101 when I run a particual routine which has
SOQL in a loop multiple times.
Thanks.
My recommendation is to move the Queries outside of the FOR loops. Query for all related data outside the for loops, process the results and logic inside the for loops, then also perform DML operations outside of for loops. Those simple concepts will help avoid governor limits. Lastly, you can use the @future annotation to get higher governor limits but those methods will run asynchronously.
I am actually summing up some data and the only way to do it is in a loop.
so I was hoping if someone knew how to persist list data so I wouldn't have to call the same routine with
SOQL in a loop multiple times.