You need to sign in to do that
Don't have an account?
brielea1984
Standard Cancel Button
My client is frustrated that at times, when they click the "Cancel" button in an edit page, Salesforce takes them back to the home page rather than back to the previous page. I know how to make an easy "back" button, but it can only be presented on the detail page (I don't want to rebuild all of my objects in visualforce). Is it possible to hack into the "Cancel" button and override it to have it redirect the user to the previous page?
Thanks!
You cannot "hack" the standard cancel button (at least, not easily; it might be technically possible, but I wouldn't advise it). The standard cancel button redirects to the retURL. If you make buttons that do not include this parameter, cancel will indeed send them to Home. You should include a retURL in your buttons and links to make sure the user returns to the correct place.
All Answers
You cannot "hack" the standard cancel button (at least, not easily; it might be technically possible, but I wouldn't advise it). The standard cancel button redirects to the retURL. If you make buttons that do not include this parameter, cancel will indeed send them to Home. You should include a retURL in your buttons and links to make sure the user returns to the correct place.
Hi,
Even if it is standard or custom objects when user clicks on cancel it will redirect to page from which it came. But i dont know why this happens in you org.
Regards,
Karthik
I think it's happening from my custom buttons that direct to another object, and when they hit cancel this happens. The first response seems to be the solution.
Thanks everyone! I'll check it as solved when I get it to work.