You need to sign in to do that
Don't have an account?
ran67
Maximum view state size limit (135KB) exceeded.
Hi
when am Executing the visualforcepage . here am using the Search Filter to display the Time sheet Record based on the Project we have selected and am getting the view state Error
Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 135.875KB
Go through this page http://salesforce.stackexchange.com/questions/4537/how-to-reduce-a-large-internal-view-state-what-is-in-the-internal-view-state
You will get an Idea about the viewstate, what it is, how to reduce etc.
I am displaying 5664 records bt am using the pagination to display the 100 records per page only,
when am getting 5664 records am getting the above error
bt am able to display the 3800 records on the page using the pagination without an view state error.
Can u say me how to resolve it
yes i have the soql query and am storing in a list .
then how to resolve my error .
Can u please suggesst me
As a workaround maybe you can use Javascript Remoting? I.e. get the records through javascript asynchronous calls and update the page. This won't add to viewstate as far as I know.
// Niklas
Can u please tell me how to use the javascript remoting ? so that it may help me
thanks for ur reply
Can u suggest me how avoid the error for List
Hi,
Remove the getter setter declaration from the list in which you are storing the soql records.
For ex -
2 solutions. Look into the "transient" keyword which tells the controller to not include that giant list in the viewstate or switch to real pagination. Salesforce now supports the "OFFSET" keyword in SOQL which will allow you to page through the data like you normally would without have to load all items into a list and page through them.
See this page for a good example of pagination in a visualforce page: http://www.redpointsolutions.com/add-pagination-to-your-visualforce-pages-using-the-soql-offset-clause
but we need to display on the page
What do you mean you need to display it on the page?