You need to sign in to do that
Don't have an account?
Imran Rahman 3
Redirecting 'new record' VF page after 'save' to custom page with ID parameter
I have a visualforce page with a standard controller which creates a new record on click of my commandButton. This function works using just standard controllers at the moment.
What I would like to do if insertion is successful, to redirect the page to my own custom detail page (mysite.force.com/detailPage?id=) instead of the salesforce's default one. I need to also pass the ID parameter of the newly created record so I can pull up the infomation on the page.
What I would like to do if insertion is successful, to redirect the page to my own custom detail page (mysite.force.com/detailPage?id=) instead of the salesforce's default one. I need to also pass the ID parameter of the newly created record so I can pull up the infomation on the page.
Hope this helps.
All Answers
Hope this helps.
I have used the following code:
But I get the following error:
Expression of type ApexPages.StandardController has no member named Id at line 11 column 42
Okay that allowed me to save the class, however another error has occured. When pressing the same command, the page is redirect to a page which states the following:
Error: Error occurred while loading a Visualforce page.
The correct page name has been used but I am still receiving the error.