function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gerry_MarlettaGerry_Marletta 

Custom Button on Contact to create Activity now showing "Page invalid for session"

Hello,

I have a custom button on Contacts that creates a new activity and prepoulates a number of fields to speed up loggin a voicemail for our Sales reps. The URL for the button is:  
/00T/e?followup=1&title=Call&retURL=%2F{!Contact.Id}&who_id={!Contact.Id}&what_id={!Account.Id}&tsk5=Call - Voicemail
&tsk6=Left+a+voicemail+for+{!Contact.Name}&00N40000001rbkJ=Call&00N40000002J1Md=Voicemail&save=x

We've not had a problem with it for close to a year, now all of a sudden when pressed, it takes us to the edit screen with the following error:
"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."

Any reason why this would start happening all of a sudden?
Ashish_SFDCAshish_SFDC
Hi Gerry,


This is a general error which does not give any specific information. 

Enable debug logs and replicate the issue - now see the logs to understand if there is any specific error or behavior. 

Also, 

Please be informed that this is considered a URL hack and it is not supported by Salesforce. Using undocumented query strings is absolutely discouraged as Salesforce can change them at any time without notice. Instead this requirement can be implemented by using the Force.com AJAX toolkit or a Visualforce page with a custom controller.

For your reference you may visit the article provided below:

https://help.salesforce.com/apex/HTViewSolution?urlname=How-can-I-allow-autosave-by-URL&language=en_US


Regards,
Ashish