I have a button on my vfpage that opens New Account Standard page. After Save or cancel its redirecting to home tab but I want to redirect to my vf page. How can I set retUrl of my VF Page in the Pagereference. Or if there is another way?

1 Answer 1


You need to set the 'retURL' parameter.

For example:


which will return the user to /apex/MyVFPage/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.