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
kittu9kittu9 

Usage of "Veiw State" in the visual force page

Usage of "Veiw State" in the visual force page

Best Answer chosen by Admin (Salesforce Developers) 
Bhawani SharmaBhawani Sharma
Then you should answer like, we can make use of transient keyword for all the properties which are required only for one transaction.

All Answers

Bhawani SharmaBhawani Sharma
View state tells you about the page size at run time. 135KB is allowed on VF page, if your page exceed that, you get an error saying view state exceed. Your class variables contribute in view state
kittu9kittu9
How to reduce the view state size?
Bhawani SharmaBhawani Sharma
You can use transient keyword for all your controller properties which you only need one transaction. Like if you want to only display a list of records, but don't want that in next action. You can keep it transient.
kittu9kittu9

In an interview they asked question like how will you reduce the view state size ?

Bhawani SharmaBhawani Sharma
Then you should answer like, we can make use of transient keyword for all the properties which are required only for one transaction.
This was selected as the best answer
kittu9kittu9

thank you so much

Bhawani SharmaBhawani Sharma
You can also click on star icon to kudoed me if it helped :