You need to sign in to do that
Don't have an account?
Jason Kuzmak 12
why is my visualforce page view state so much larger for other users?
Hi all,
There are probably steps I can look into to further optimize my visualforce page, but before I start into that, I'm wondering if it's not some sort of browser issue.
When I look at my view state size in the developer window it says 79KB. When my field tech tries to open it, it says that the view state has exceeded the limit of 170KB, and is 194KB instead. Why would it be more than 100KB larger when another viewer tries to access it?
Hope this helps.
All Answers
Hope this helps.
@Dushyant Sonwar
Unfortunately, I'm the admin and would have access to more of the information than the technician who is receiving the error.
There might be custom data rendering/filtering logic for specific user profile/roles on vf pages or apex class.
It would be helpful if you post your vf and apex code.
Thanks,
Hi Dushyant,
No problem, and thanks!
For some context, the structure of this custom checklist object is that a guy in our engineering department creates items for the checklist through the template object (Checklist_Template_Item__c), but these items don't get queried until a specific machine is being serviced, since each item applies to several (but not all) machines. In this way he can create a single item, and just tell the system what machines it applies to. They get populated and attached to Salesforce's WorkOrderLineItem records as Checklist_Item__c object records, and are displayed in their respective Checklist_Section__c using <apex:repeat>.
Here is the visualforce code:
Here is the controller:
You can reduce the view state , just replacing the apex:datatable with html table. Plus you have nested data so i think that also putting more weight on your vf page.
If still view state is exceeding after datatable replacement , then you need to flat out your data to avoid nesting wherever there is possiblity to reduce nesting of data.
Hi Dushyant,
Your first suggestion worked!! I had originally started with HTML tables, and was unwilling to try to make that work again X)
Sorry to make you wade through all of my code; I gave my test user permission to the Checklist Section object, and that seems to have done the trick.