Page you submitted was invalid for your session. - Answers - Salesforce Trailblazer Community
Ask Search:
Jeremy YorkJeremy York 

Page you submitted was invalid for your session.

I have a custom button on a custom object where it initiates the edit function, populates a text field with a value, and then saves.  This has been working fine until something changed over the last few months.  Now, the save part of the button(either "&save=1" or "&save=x") causes the error below:

Error: Invalid Data.
Review all error messages below to correct your data.
The page you submitted was invalid for your session. Please click Save again to confirm your change.

Custom Button(URL): /{!Statement_of_Work__c.Id}/e?retURL=/{!Statement_of_Work__c.Id}&00Na000000B1fg9="Accepted"&save=1

Any ideas on what may have happened?
Best Answer chosen by Jeremy York
Marty ChangMarty Chang

Hello, Jeremy, based on a thread started by Natalie Regier[1], it appears that the autosave URL hack no longer works. Due to the fact that the process was indeed a hack, using an undocumented URL parameter, salesforce.com exercised its right to remove the "feature" due to security concerns.

At this point, I recommend using the AJAX Toolkit[2] to implement the same feature you described. Unfortunately this will require you to write JavaScript, which I understand may be a deterrent for some organizations. You can probably search online to find an example[3] or two demonstrating the AJAX Toolkit.

[1]: thread started by Natalie Regier (https://success.salesforce.com/0D53000001OeoxV)
[2]: AJAX Toolkit (http://www.salesforce.com/us/developer/docs/ajax/index.htm)
[3]: an example (http://pastebin.com/UqmQWvfX)

All Answers

Marty ChangMarty Chang

Hello, Jeremy, based on a thread started by Natalie Regier[1], it appears that the autosave URL hack no longer works. Due to the fact that the process was indeed a hack, using an undocumented URL parameter, salesforce.com exercised its right to remove the "feature" due to security concerns.

At this point, I recommend using the AJAX Toolkit[2] to implement the same feature you described. Unfortunately this will require you to write JavaScript, which I understand may be a deterrent for some organizations. You can probably search online to find an example[3] or two demonstrating the AJAX Toolkit.

[1]: thread started by Natalie Regier (https://success.salesforce.com/0D53000001OeoxV)
[2]: AJAX Toolkit (http://www.salesforce.com/us/developer/docs/ajax/index.htm)
[3]: an example (http://pastebin.com/UqmQWvfX)

This was selected as the best answer
Jeremy YorkJeremy York
Thank you very much Marty! I appreciate the information.