You need to sign in to do that
Don't have an account?
acrozier
redirect to previous page
Hello,
I am trying to create a save and return button for my custom edit page and I am struggling to get a page reference that will return the user to the previous page. What method do I use to return the Previous Page?
You want to redirect to previous page means?
Please elaborate a bit.
I think you have to save every page you visit in some variable. And in method that handle go back on previous page you should set this (previous) page as current and return it. Smth like this.
To elaborate I need to current visualforce page I am on to redirect to the previous page. The user gets to this edit page of of my custom object page named "Job".
I found this method, but how do I apply it to return to the previous URL?
For that when you are redirecting user to your edit page pass the previous page name along with it as a parameter.
suppose ur previous page name is Referer, then pass it as a parameter.
then in ur edit page, after save, redirect your page to previous page.
now you will get the page name from the current page url (since you pass the page name in previousPage variable)
hope it helps!
I am a little bit confused by this response, can you highlight what you can in the code below so that I can see an example? This edit page is reached from a related list on the job custom object.
edit page visual force
edit page extension class
how are you redirecting to this edit page?
if custom code, please post the code.
the code that i posted is what the edit button redirects too
The page from where you are redirected to this edit page is custom or standard?
it is a standard page, but custom object
you have overidden the edit button with you page, so there you need to pass the page name as a parameter.
so I would have to create a custom page for the object I am getting to this edit page from?