You need to sign in to do that
Don't have an account?
EIE50
Basic governor limit workaround
Hi,
I have a situation where i have to list out all the records in one page. I can write a query for this, but there are few thousands of records around 40k+, so how do i get around the governor limit in this case?
This is my sample code :
List<Idea> abc = [select DomId from Idea]; System.debug('#############'+abc.size());
Here is the debug log :
Number of SOQL queries: 1 out of 100 Number of query rows: 43509 out of 50000
Can anyone lead me with a code snippet to get around the governors.
Thanks.
You can't by pass the limits, but if you don't need to update the records you're returning, set the page to ReadOnly (it's a new feature in Winter 12)
All Answers
You can't by pass the limits, but if you don't need to update the records you're returning, set the page to ReadOnly (it's a new feature in Winter 12)
Hi,
Should i use @readonly annotation in my apex class and set my vf page attribute to read only, or only in apex class or only in Vf page?
Just set it on the page, and it will let the Apex controller called by that page bring back up to 1m rows...
Thanks, i got it.
How do you set the page to readonly or @readonly?
On the page tag:
<apex:page readOnly="TRUE">