You need to sign in to do that
Don't have an account?
Tushar Seth
ViewState Problem in Salesforce Production
Please let me know how to solve ViewState Problem.....
In Sandbox:
Now I can able to create and send Email with attachment ....
And Whole functionality is going good in sandbox wheater I upload file of 200kb or 10kb.....
In Production
When I am uploading file of below 135 kb it is working fine.....
but when I am exceeding from 135kb, ViewState error is encountered in VisualForce page...by showing
Error : Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 410.891KB.
does anybody have any idea how to get rid of this problem...???
This can help you out :
http://forceguru.blogspot.com/2010/11/best-practise-to-write-apex.html
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Thanks buddy your blog is good .....
but that wouldn't work on my problem ......
But I got the solution....
Please share with us the solution.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
hii buddy
I don't want to upload file more than 50 kb but if the user delibrately upload the file in that page it was displaying that Error
So What I did as an Alternative Option..is as we have
Attachment object and in that there is a filed body of datatype base64 so we can make it null as it goes over our limit of File
Attachment desktopattachment = new Attachment();
// In Validation Block
desktopAttachment.Body = null; // Delibrately : If you exceed by 135kb
So basically making object instance , variables and properties null solves your problem. Hope my blog helped you somehow.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Great solution. Thank you very much