You need to sign in to do that
Don't have an account?

Help with retURL behavior: after -New- button and save, goes to list not detail view, why?
Hey community!
Easy question.
1. I have a visualforce page that is an edit page
2. I override both the edit and new standard buttons so that they go to this page.
2. I override both the edit and new standard buttons so that they go to this page.
Use Case
a) I am in the list view to show many records of my object
b) I click on the "New" standard button to create a new record, it goes to this page:
https://na2.salesforce.com/a05/e?retURL=%2Fa05%2Fo
c) I add data and click save.
d) PROBLEM: After the save it takes me to the list view, not the newly created records detail view.
a) I am in the list view to show many records of my object
b) I click on the "New" standard button to create a new record, it goes to this page:
https://na2.salesforce.com/a05/e?retURL=%2Fa05%2Fo
c) I add data and click save.
d) PROBLEM: After the save it takes me to the list view, not the newly created records detail view.
I can see by the URL that the retURL will throw me back to the list view, not the detail view, but why this behavior? How do I override it if possible or account for it?
Thanks and do let me know if you need more clarity.
Appreciate in advance!
Message Edited by bev90210 on 10-09-2008 06:49 PM
Message Edited by bev90210 on 10-09-2008 06:50 PM
In your save method of your VP page controller redirect the user to the detail page of your object.
For this example the following code will force the navigation as you have specified:
However, if I have the controller extension call the standard controller's edit page under those circumstances:
return controller.edit();
I get a message that says
You cannot call edit() on a null object
Any suggestions?