We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [viewstate]

ViewState holds the state of a visualforce page including the components, field values and controller state.

Filter by
Sorted by
Tagged with
2
votes
3answers
51 views

Difference between Transient and Static variable?

In SF docs, we will get an example of transient variable getting recreated each time the action is done via button. It will help to reduce view state. Although if I used static keyword the view state ...
1
vote
1answer
32 views

How to avoid Authorization Required redirect when exceeding view state size as site guest user

When the view state size is exceeded, the page content is usually replaced with a message that says Maximum view state size limit (170KB) exceeded. Actual view state size for this page was [size]KB. ...
0
votes
1answer
21 views

how to enable view state checkbox for non salesforce admin profile

we have multiple user who's user licence is salesforce but profile is not system administration, profile's are different-different. i need to enable view state and development mode for particular user....
0
votes
0answers
25 views

Visualforce page state is lost when calling a controller method after page is loaded

In classic after my visualforce page has loaded the controller state is not lost. So if I click a save button the controller variables have values and the logic executes. In lightning after my ...
0
votes
0answers
23 views

Rerendering component has huge increase on view state

I'm working on a page with a very large dataset. There is a part of the page that downloads the report as a CSV file: <apex:outputPanel id="downloadCSVSection"> <script> ...
0
votes
0answers
56 views

View State Error Uploading Files

I have a visualforce page that allows for uploading multiple files at one time (up to 10) I have tested it several times in the sandbox and had no issues. However, I am now getting intermittent view ...
7
votes
2answers
2k views

refreshView for Lightning Web Component?

Whats the lwc equivalent of this aura event? $A.get('e.force:refreshView').fire();
4
votes
2answers
70 views

How is an object instance passed with apex:attribute reflected in ViewState?

BACKGROUND I want to build a wizard using Visualforce Components. For this I represent each step as a separate component. Each component has an attribute that represents a controller instance from ...
3
votes
1answer
36 views

Show View State checkbox on User record is missing

I have one client where the "Show View State in Development Mode" checkbox field is missing on the User detail screen, so I can't enable View State. The user has a full Salesforce license and is a ...
6
votes
1answer
158 views

How to keep components out of the Visualforce view state when they are not needed?

The view state problem we mainly run into is not properties of the controller using it up (as we use transient heavily) but the component tree that the Visualforce tags generate using it up. That is ...
5
votes
2answers
215 views

Maintain state in Visualforce Page without using View State

I would know if there is some way to maintain state across different transactions without using View State. For example, if in my Custom Controller, for every action method, I need 100 Account's ...
1
vote
1answer
80 views

Is it possible to maintain viewstate in Visualforce when using the browser's refresh button?

Question is in the subject - is there a way to solve the issue of the browser refresh clearing the viewstate. The scenario in mind is a multiple Visualforce page form, where the user could ...
1
vote
1answer
217 views

View State Error in VF page

Why can't we declare all of our variables of Controller as Transient to avoid View State Error. What's the use of non transient variables.
0
votes
0answers
41 views

How to catch View State Exception and display custom message instead

I have a controller extension for a VF page that runs a query that could possibly over load the view state, I don't want to optimize it but instead catch the exception and display a custom message. Is ...
0
votes
0answers
29 views

After migrating page to other sandbox got error : View state size exceeded [duplicate]

I have VF page and a controller class working fine in my dev sandbox. The same functionality i am trying to migrate to completely different company's sandbox. I deployed all components through package....
0
votes
1answer
95 views

VF Error: Maximum view state size limit (135KB) exceeded

One of our VF page is based on a REST web-service which retrieves Service requests from Siebel in real-time. When number of records exceeds 1000, we were receiving below error because of which i added ...
0
votes
2answers
85 views

Seeing the View State for a page in a managed package in customer orgs

We have a managed package that we have installed in customer orgs. One of the pages shows the error below when loaded: I know I can go to user settings and turn on "Developer Mode" and "Show View ...
1
vote
2answers
321 views

Why is View state needed for Salesforce

What is the need for view state in salesforce. There are lot of definitions how to lower the size, what is etc. But why we need view state is not illustrated. can anyone help me on this. Thanks, ...
0
votes
1answer
16 views

Visualforce page “clobbered” by Visualforce email template

So I've run into a bit of a crazy issue that may or may not qualify as a bug. But it's really weird. I haven't had the time to put together a minimal example but I will describe it here, anonymized. ...
1
vote
1answer
322 views

Getting “Maximum view state size limit (135KB) exceeded” error

Here is what I'm trying to achieve: Upload a csv file on the click of "Upload File" button. ReadFile() method is invoked On click of "Action" button, all the row data will be uploaded to a custom ...
2
votes
0answers
473 views

How to inspect View State for Community User VF page/controller

I would know if there is a method to know size of ViewState in a Controller Apex. I read Limit Apex Class but I don't find a method about this scope. I want debug a Community User and I don't find a ...
0
votes
1answer
251 views

Maximum view state size limit (135KB) exceeded" error message in vf page [duplicate]

I have the following code and i am just getting the following error, How can i reduce the size of view state ? Maximum view state size limit (135KB) exceeded" error message public class ...
3
votes
1answer
152 views

Is it possible to prevent unused Visualforce Components from using View State?

Components appear to use View State even if they are not rendered. i.e. there is almost no difference in the View State size between the following two options: <c:my_component rendered="true"/>...
2
votes
2answers
419 views

Visualforce Pagination and Viewstate

I am working on a searchpage in Visualforce where pagination is needed on a very large dataset. StandardSetController does not seem to be a good fit due to the fact that the entire dataset is still ...
0
votes
1answer
84 views

When VF page is refreshing the data on the page is loosing how to avoid it?

I have a VF page where Account data is entered, before saving the record I am redirecting to a different page here I don't want to pass already entered values as parameters but I want to maintain view ...
0
votes
2answers
1k views

Getting Error “Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 240.082KB ”

Already Gone through many different links related to this Error, but still in problem. Getting this error when I am uploading large size file. If I am using the Transient keyword then my i am unable ...
1
vote
0answers
105 views

Understanding concept of view state

I am trying to understand the concept of view state and hence was going through the official documentation at : https://developer.salesforce.com/page/An_Introduction_to_Visualforce_View_State. I have ...
0
votes
0answers
19 views

Control variables to be fetched on VF so as to utilize view state space

I have a doubt on having/pulling variables on VF. Lets say I have 2 scenarios in VF page. The second one is dependent on first one's condition. So, is there any way, to flush out 1st scenario's ...
0
votes
2answers
133 views

image uploading issue

How to upload files to an outside service, larger than 3M? And this error on uploading: Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 156.719KB <apex:...
1
vote
1answer
101 views

Visualforce page view state size limit OR de-reference a null object for transient attachment error

I have the below Visualforce page & controller class for a user to select a design document type & upload a file. Document_Type__c is a picklist and should be required. The code below works ...
2
votes
1answer
359 views

View State Information Hidden on Managed Packaged VF Pages

I have been attempting to get the View State information for my managed packaged VF page within a customers sandbox. The user I am logged in as does have Development Mode and Show View State in ...
5
votes
1answer
643 views

View state does not appear on pages using Standard controllers?

I am looking into 'View State Limit exceeded' error and want to display the View state information using the development mode footer. For my user, I have enabled both Development Mode and Show View ...
2
votes
1answer
678 views

view state does not save state

I have a VFP that displays three different views from the same table, Case. I want to be able to remember the sort column and direction of each of the three views and using a view state seemed to be ...
2
votes
3answers
456 views

Maximum view state size limit (135KB) exceeded. Help in resolve

Hi I have a VF Page and a controller which works fine on sandbox , But somehow they fails and give the following error on production which is due to view state Maximum view state size limit (135KB) ...
0
votes
2answers
151 views

Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 156.828KB

Following is the code in which I am getting a view state error : VF PAGE: <apex:page standardController="Technical_Verification__c" extensions="tvDocUpload" sidebar="false" showHeader="false" ...
0
votes
2answers
841 views

Maximum view state size limit (135KB) exceeded for Attachment

I am getting this error Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 143.125KB I am uploading the files in attachment object and showing them on one ...
2
votes
1answer
83 views

Why am I exceeding viewstate when using button+actionfunction, compared to using commandButton?

I have a very simple page: <!-- vf page --> <apex:page standardController="Challenge__c" extensions="upsertChallengeResponse" sidebar="false" tabstyle="ChallengesVF__tab" ...
0
votes
0answers
187 views

View state in Visualforce components

I am developing a VF page which will have two components. These two components will be placed multiple times on the same page with different input parameters. I am not sure how much view state will ...
0
votes
1answer
61 views

View state mode of an inline VF page

I have a visual force page which I have embedded in a custom object page layout. I have the developer mode and view state enabled in my user setting. But when I go to the record where I have embedded ...
4
votes
0answers
73 views

how to see view state size for non system administrator profiles?

I am working on a product in which multiple profiles are applicable for same features (Data is coming according to profile and there are also some layout changes). I like to see the view state of page ...
-1
votes
1answer
880 views

View state error when large number of records returned

I am getting view state error for my code. Apex class: public with sharing class zisQuoteSourceListOnQuoteDetailCon { public String zisQuoteId {get;set;} public String ...
1
vote
1answer
1k views

PageReference add Page.PageName

Here is the problem. I have one controller for both pages and I need to have that controller because of view state. I am passing values from home to about us page. I am getting two different behaviors ...
2
votes
0answers
91 views

Viewstate exceeded, but only in managed release version

I have a VF page in my managed package, and QA noticed that the viewstate blows up if more than 200 records were selected on the previous page (it's part of a wizard). When I attempted to reproduce in ...
0
votes
0answers
53 views

Why view state is not available for VF page with JQuery Plugins?

Whenever i use JQuery Plugin in VF page, view state disappears. Is there any alternate way to check view state while using Plugins. Thanks in advance.
0
votes
0answers
307 views

View State Error for Portal User

I am having visual force page and it accessed by both system administrator and portal user. Now the visual force page is working fine in System administrator and its not working and getting View ...
3
votes
1answer
648 views

Redirect in page action attribute

To model the situation, let's say that I have two visual force pages, which use the same controller. Let's call them PageStart and PageEnd. PageStart uses action attribute for apex:page element. ...
2
votes
4answers
935 views

Maximum view state and “transient” keyword

Good day Everyone, I am trying to upload a csv file. I don't have any issue when trying to upload a small csv file. But the problem is that, when I try to upload a large file I get an error in "...
5
votes
1answer
171 views

view state encryption for visualforce pages

Since visualforce pages are served over https connections, is view state encryption really required? How will this affect view state performance?
2
votes
0answers
514 views

apex:inputCheckboxes not retaining state inside apex:repeat

If the checkboxes are re-rendered, you can see that your input has been ignored. Whether re-rendered or not, the controller is unaware of your input upon form submission (it throws the exception that ...
2
votes
1answer
946 views

View state size limit & de-reference null for transient

I have below code to allow multiple file attachments to be inserted against a parent record id. But this results in either View state size limit exceeded (not all the time) or dereferencing null ...