I would like to set a return URL after pressing the save commandButton on a new record page. How can I do this?
Code:
<apex:commandButton value="Submit" action="{!save}" styleClass="btn btn-default" rerender="error,styledError,unstyledError"/>
EDIT: I would like it redirect to my own custom detail page, which means I must also pass the ID of the record as a paramater
&saveURL=/apex/mynextpage
on the link that leads to your vf page. Then when the user presses "Save" they go to/apex/mynextpage
– Dominic Oct 7 '14 at 9:50