+ Start a Discussion
Peter CowenPeter Cowen 

back to record button

Is there a way to create a button that takes you back to the previous record?

I have a custom button that navigates out of a case to allow us to fill another area but to go back to the case we were working on we have to press the case number in a lookup field. A button would help?
Best Answer chosen by Peter Cowen
VineetKumarVineetKumar
Adding retUrl will work for your backspace key, or the back history button of your browser.
But if you want to add a button to go back to some page, in your case the case Id create a button with execute javascript having the below code
Button Type [Detail Page Button : Display in existing window without sidebar or header : URL]
Formulae : /<caseId field> - case Id field you can get from the merge field option

All Answers

VineetKumarVineetKumar
Is it a VF page or standard page?
Peter CowenPeter Cowen
Standard page. The first record is a case which has a related list with a button that takes you to another standard page in that object.
Mammu4Mammu4
Hi,
To the custom button you already have, add "&retURL={!Case.Id}" at the end of URL. Hope it helps!
VineetKumarVineetKumar
Adding retUrl will work for your backspace key, or the back history button of your browser.
But if you want to add a button to go back to some page, in your case the case Id create a button with execute javascript having the below code
Button Type [Detail Page Button : Display in existing window without sidebar or header : URL]
Formulae : /<caseId field> - case Id field you can get from the merge field option
This was selected as the best answer