
What is View state and How to enable view state in Salesforce
- Go to setup –> Administration Setup –> Manage Users –> Users.
- Select the user.
- Click ‘Edit’ button.
- Check the ‘Show View State in Development Mode’ checkbox.
- Click ‘Save’ button.
- From your personal settings, enter Advanced User Details in the Quick Find box, then select Advanced User Details. No results? ...
- Click Edit.
- Select the Development Mode checkbox if it isn't selected.
- Select the Show View State in Development Mode checkbox.
- Click Save.
What is view state in Salesforce Visualforce?
Since the view state contributes to the overall size of your page, performance of a page can depend on efficiently managing the view state. The View State tab in the development mode footer provides information about the view state of your Visualforce page as it interacts with Salesforce.
What is view state in salesforce development mode footer?
The View State tab in the development mode footer provides information about the view state of your Visualforce page as it interacts with Salesforce. If your not using input tags in visual force page form is not required.Without form Viewstate is not created. Minimize number of form on a page. Use apex:actionRegion instead of using 2 or more forms.
How to view the contents of the view state?
Developer environments have a view state inspector, which lets you view the contents of the view state. This information can help you in optimizing the view state size. Once enabled, it shows up as a tab in Development Mode, as follows. you can enable that from Edit User-> Select view state checkbox after development mode checkbox.
How do I maintain state in a Visualforce page?
To maintain state in a Visualforce page, the Force.com platform includes the state of components, field values, and controller state in a hidden form element. This encrypted string is referred to as the view state and has a limit of 135KB.

How do I check my view state?
You can access view state in your code by using the page's ViewState property. The ViewState property is a dictionary that contains key/value pairs that contain the view state data. Security Note: It is easy for a malicious user to see and modify the contents of a hidden field.
What is the view state in salesforce?
View state holds the state of Visual force page. The view state of a web page is composed of all the data that's necessary to maintain the state of the controller during server requests (like sending or receiving data).
What is view state size in salesforce?
Salesforce allows Visualforce pages to have a maximum view state size of 170KB. The View State tab shows you which elements on your page are taking up that space. A smaller view state size generally means quicker load times. In order to avoid this error, minimize your pages' view state.
What are states in VF page in salesforce?
What is view state in salesforce? ViewState holds state of the visualforce page that holds state that includes the fields, components and controller state. Viewstate data in encrypted and cannot be viewed tools like firebug. There is a limit of 135KB of view state.
What is ViewState VF page?
View state holds the state/size of the visual force page that includes the components, field values, and controller state. This is important in the light that salesforce provides only a standard size of 135kb for any individual page.
How do you solve a view state error?
For a quick solution you can find the variable using "View state" tab which is taking too much state, and then you can use "transient" keyword in the controller with variable as mentioned above.
What is SOSL in Salesforce?
Salesforce Object Search Language (SOSL) is a Salesforce search language that is used to perform text searches in records. Use SOSL to search fields across multiple standard and custom object records in Salesforce. SOSL is similar to Apache Lucene.
What is actionSupport in Salesforce?
actionSupport component adds AJAX support to other components in visualforce. It allows components to be refreshed asynchronously by calling the controller's method when any event occurs (like click on button). It allows us to do partial page refresh asynchronously without refreshing full page.
What is heap size in Salesforce?
Salesforce enforces an Apex Heap Size Limit of 6MB for synchronous transactions and 12MB for asynchronous transactions. The "Apex heap size too large" error occurs when too much data is being stored in memory during processing.
What is the difference between Actionsupport and Actionfunction?
Action function can call the controller method from java script. 2. Action support adds AJAX support to another visualforce component and then call the controller method. Here action support adds AJAX to output panel, so once you click on output panel controller method will be called.
How do I use Action regions in Salesforce?
actionRegion provides an area of a Visualforce page that decides and separates which components should be processed by the force.com server when an AJAX request is generated. Only the components which are inside actionregion component are processed by server, so it increases visualforce page performance.
How many records can we display in Visualforce page?
It allows the developer to configure list view to display up to 100 records at a time, but by default it returns 20 records on the page.