- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2024 01:29 AM - edited ‎03-26-2024 01:35 AM
Hi All,
How to disable the Back button in Service Now.
Did anyone worked on this. Any help will be greatly appreciated.
Regards,
Sadique
Note:- I have already tried some methods/codes that is available in community but not working.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2024 02:22 AM
Hi @Sadique Kabir,
This can be achieved with 2 steps as outlined below, however, I would like to ask what you're trying to achieve by removing this? What happens if someone uses the back button in the browser itself?
To answer your question directly however:
- Create below onLoad client script
- Make sure the 'isolate script' column for this script is set to false (Default is set to true to prevent DOM manipulation) - See below.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie
Script:
function onLoad() {
// This hides the back button
document.getElementsByClassName("btn btn-default icon-chevron-left navbar-btn")[0].style.display="none";
}
'Isolate script' set to false. (see below)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2024 01:37 AM - edited ‎03-26-2024 01:38 AM
It is possible to disable back button on the form. For that, run the below Client Script:
function onLoad()
{
document.getElementsByClassName("btn btn-default icon-chevron-left navbar-btn")[0].style.display="none";
}
Apply the above script on table.
Now, you can see there is no back button on the form.
Please mark reply as Helpful/Correct, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2024 01:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2024 02:12 AM
I have no solution, but why you want to remove this, it is a good part and enhance user experience.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2024 02:21 AM
Hi @Dr Atul G- LNG ,
Actually I got a requirement in service portal project where browser back button is landing upon list view...
and this back button landing upon self service...
that's why I wanna remove this button...