You need to sign in to do that
Don't have an account?
Payel Ghosh
Not able to redirect to a standard controller VF page
I have written a standard controller VF page. Now from anoth is er VF page I want to redirect to the standard controller VF page. I am trying to do it through pagereference. But it's not getting redirected. But if I remove the standard controller from the destination, then it's getting redirected to that page.
My standard controller page is getting displayed perfectly when I am displaying it from a custom button. Only when from another vf page I want yo redirect to this standard controller page, that's not happening.
Below is the standard controller VF page. Name of the Page is SaveMessagePage. -
Below is extension controller of another VF page from where I want to redirect to the above page -
PageReference p = new PageReference('/apex/SaveMessagePage');
Return p;
Please help.
My standard controller page is getting displayed perfectly when I am displaying it from a custom button. Only when from another vf page I want yo redirect to this standard controller page, that's not happening.
Below is the standard controller VF page. Name of the Page is SaveMessagePage. -
Below is extension controller of another VF page from where I want to redirect to the above page -
PageReference p = new PageReference('/apex/SaveMessagePage');
Return p;
Please help.
You can try checking the below link I think this could help in your use case:
>> http://writeforce.blogspot.com/2014/08/demystifying-pagereference.html
In case if this comes in handy can you please choose this as the best answer so that it can be used by others in the future.
Regards,
Anutej
Thank you. The issue is solved now. After giving setredirect(true), I was not hard refreshing the page, so the change was not reflecting and I removed that line. But now it's working :)