You need to sign in to do that
Don't have an account?
Mudasir Wani
Page Reference getContent method throwing an error.
Hi Guys,
For last few days we are facing an error in our existing code which uses PageReference.getContent.
When this peice of code runs it gives us following error.
"The page you submitted was invalid for your session. Please try your action again".
I have visited many blogs which are saying it is a network problem.
We have checked it with different networks and on different salesforce instances as well and there is same result.
Can you please help.
For last few days we are facing an error in our existing code which uses PageReference.getContent.
When this peice of code runs it gives us following error.
"The page you submitted was invalid for your session. Please try your action again".
I have visited many blogs which are saying it is a network problem.
We have checked it with different networks and on different salesforce instances as well and there is same result.
Can you please help.
I was because of the following critical update "Enable CSRF protection on GET and POST requests" we need to deactivate this update.
Please refer to the knowledge article about the same.
https://help.salesforce.com/apex/HTViewSolution?urlname=Error-The-page-you-submitted-was-invalid-for-your-session-Please-click-Save-again-to-confirm-your-change&language=en_US
Best Regards,
Mudasir Wani.
All Answers
You are absolutely right.
The problem is that we have same peice of code in production and it is working fine.
i donot know whether it is an issue with Salesforce instance.
The page whose content we are trying to get in the Blob is rendered as pdf.
Best Regards,
Mudasir.
I was because of the following critical update "Enable CSRF protection on GET and POST requests" we need to deactivate this update.
Please refer to the knowledge article about the same.
https://help.salesforce.com/apex/HTViewSolution?urlname=Error-The-page-you-submitted-was-invalid-for-your-session-Please-click-Save-again-to-confirm-your-change&language=en_US
Best Regards,
Mudasir Wani.