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
Satish.jgecSatish.jgec 

Automatic recordtype selection - session timeout issue

Hi All,
I have gone into a problem of automatically assigning a record type to a child object based upon the record type of a parent object.
I have a custom child object "Additional products" linked to the case object and the RecordType.DeveloperName on the child object is exactly the same as that of the case record types.
I am able to achive the automatic recordtype selection without any problems by following ht ebelow blog:
https://force201.wordpress.com/2011/05/21/automatically-setting-the-record-type-of-a-detail-object-based-on-the-record-type-of-its-master-object/

It works unless I hit the "Save and New" button. The moment I click the "Save and New" button after creating the first child record, I get the below error:
The page you submitted was invalid for your session. Please click Save again to confirm your change.

Everywhere I read that this can be resolved by using AJAX toolkit using javascript, but there is no mention of any helper code to resolve this issue. (OR else you need to create a ticket with SFDC to disable the GET and POST for the Org which is not desired at this point)

Any help from the developers out there (with a code sample) would be highly appreciated.
SandhyaSandhya (Salesforce Developers) 
Hi Satish,

Just see In your Org Security Controls > Session Settings If you have enabled anything.

From Below link.

http://salesforce.stackexchange.com/questions/103697/the-page-you-submitted-was-invalid-for-your-session-please-click-save-again-to
 
Hope this helps you!

If this helps you, please mark it as solved.

Thanks and Regards
Sandhya
Satish.jgecSatish.jgec
Hi Sandhya, Thanks for your email. I have gone through the link few days back but there is no URL hack in this. I have even tried desperately with the session settings but of no avail. Let me know if you have encountered such issue and steps to resolve it. *____________________Regards,Satish.S*