I've overridden the standard button "New" of a custom object with a VF page. On this page, for saving record I'm using standard "save" action. But on saving, it's not redirecting back to the original page. I've checked retURL and it is passing correctly. I know I can create extension class and override save action. But can we do without that?
<apex:commandButton value="Save" action="{!save}" />
Best Answer
Edit : You can proxy the invocation of the Standard Save method via an ActionFunction, but then override the redirect by using the onComplete to redirect to a custom URL. Here is a sample I did for overriding the New button for Contact : (By default the Save method returns you to the Contact newly created, however using this I managed to get it to return to the Account I clicked the New Contact button on)
In summary, it does seem possible to do without a Controller! (Although I noticed some javascript race issues at times, but works for the most part)
My understanding of retURL is the location you want to redirect to when the user hits Cancel. To control the page to navigate to on Save, the saveURL is used.
When creating a new record from inspecting the URL, it also adds save_new_url=/003/e for Contact. I would try adding this.
Could you post the URL you have set the new button to redirect the user to when they click new. (what I usually do is copy the URL that salesforce by default sends you to when clicking new)
I would also try adding noOverride=1 to the URL.