You need to sign in to do that
Don't have an account?

set redirect issue
Hi All ,
I have a VF page which is a standard controller(opportunity) with extension . It has a form with some input text fields and next button ,
Next button calls pagereference method which redirects the page to std edit pagelayout of opportunity(setRedirect(false)) .In the url I have also mentioned retURL which points to the VF page .
So my query is when I fill some text fields and clicks on next button , it redirects to opp edit page . Now when I click on cancel button, It takes me to vf page but the form values are missing .
Can anyone tell me why the view state is missing or getting flushed out when i return back to VF page using cancel button .
Note : The form is html form , not a <apex:form> .
As per salesforce doc , "if set to false, the redirect is a server-side forward that preserves the view state if and only if the target page uses the same controller and contains the proper subset of extensions used by the source page."
My source page is VF page (std cont -opp with ext) and target page is opportunity edit page .So here controller are the same . So it has to work as per the doc ? or am I missing something here
I have a VF page which is a standard controller(opportunity) with extension . It has a form with some input text fields and next button ,
Next button calls pagereference method which redirects the page to std edit pagelayout of opportunity(setRedirect(false)) .In the url I have also mentioned retURL which points to the VF page .
So my query is when I fill some text fields and clicks on next button , it redirects to opp edit page . Now when I click on cancel button, It takes me to vf page but the form values are missing .
Can anyone tell me why the view state is missing or getting flushed out when i return back to VF page using cancel button .
Note : The form is html form , not a <apex:form> .
As per salesforce doc , "if set to false, the redirect is a server-side forward that preserves the view state if and only if the target page uses the same controller and contains the proper subset of extensions used by the source page."
My source page is VF page (std cont -opp with ext) and target page is opportunity edit page .So here controller are the same . So it has to work as per the doc ? or am I missing something here
I am concerned when i go back to source page from target page by clicking on cancel button .
Can you not save these information in to the object, instead of retaining them in viewstate, when the user clicks Next button?
This way, you can reload the data, when the user clicks on cancel button.
Hope ur clear right now.