You need to sign in to do that
Don't have an account?

Visualforce View State workaround
Hi
We use custom functionality that uses Apex Class to get a certain set of records and a custom visualforce page to display them.
It is used on several different record types on one object, but for two of those, there are too many results and we get the View State limit exceeded error.
Is there a way to limit the amount of records it can display per page?
So there would be multiple pages if the amount exceeds the limit.
Thanks!
We use custom functionality that uses Apex Class to get a certain set of records and a custom visualforce page to display them.
It is used on several different record types on one object, but for two of those, there are too many results and we get the View State limit exceeded error.
Is there a way to limit the amount of records it can display per page?
So there would be multiple pages if the amount exceeds the limit.
Thanks!
Have you tried declaring the list with the records as transient (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_transient.htm)? This way it won't part of the view state and you will be able to display all the records. It will recreate with every refresh though...
Hope this helps