You need to sign in to do that
Don't have an account?
stollmeyera
How to redirect from one VF page to another on save
I have one VF page for a parent record and a second VF page for the child record. I would like the two pages to link together on save. That is, I input values on page1, upon hitting save it saves the values and then redirects me to my second page. Considering it is a simple redirect, I really don't feel I need to write a controller, correct?
You can use following code;
But If you want to use same controller class for both pages, setRedirect(false);
Otherwise it will run the constructor.
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
The code suggested by chamill is fine but it might create some exception in case of Managed package or if the org have a namespace so to avoid such exception use the following code.
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.