Sign up ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

You need to set the 'retURL' parameter.

For example:


which will return the user to /apex/MyVFPage/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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