I am trying to call a VF page from another VF page which use the same controller.
I am getting the error when i click on the command button which calls the pagereference method and redirects to the next VF page
The page you submitted was invalid for your session. Please refresh your page and try again.
Apex Class
public pageReference SaveNext()
{
Savepoint sp = Database.setSavepoint();
Try
{
showErr = false;
update opp;
update services;
}
catch(exception e)
{
showErr = true;
errMsg = e.getmessage();
Database.rollback(sp);
return null;
}
PageReference prep = Page.WonPrepCustomer;
prep.getParameters().put('id',opp.Id);
//return new pageReference('/apex/WonPrepCustomer?id='+opp.Id);
return prep;
}
VF page (Commandbutton code)
<apex:commandbutton action="{!SaveNext}" value="Next to Customer Prep" styleClass="slds-button slds-button_brand" rerender="errorParent" />
Looking through all the other posts regarding this issue. Here are things i already tried
- Enabled in Session settings
Enable clickjack protection for customer Visualforce pages with standard headers.
Enable clickjack protection for customer Visualforce pages with headers disabled
Added Showheader=true on
<apex:page/>
tag.Use Page. instead of partial url.
Issue remains on classic and lightning experience
Is there anything else that i can try?