function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
amar joshiamar joshi 

How do I get to know the size of the view state of my page

Hi Experts,


one day I was running my VF page i got the error "Maximum view state size limit (128K) exceeded. Actual viewstate size for this page was 130.047K"


 now i wont to know that what is my viwe state size when i m running the VF page coz i want to control the size b'coz we are creating & testing the VF page with small amount of data.we don't know how customer may use it so i want to know the view state size of the page so we can control it.


 if anybody have idea how to know the view state size please let me know



Best Answer chosen by Admin (Salesforce Developers) 

In the Summer '10 release we'll be piloting a new Visualforce feature that allows you to see what's contributing to view state on your pages. In the mean time, you might start by looking at the fields in your controller, and marking those not needed to maintain view state as "transient".