- 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
‎11-21-2024 09:34 AM
Hi @GG_Indirakumar,
You'll see the above script is written specifically for the 'problem' table. Have you ensured upon creating the script you've selected the scoped table for which you want to hide the back button. For example, if this was for CSM (Scoped Customer Service Management app), the table field would need to reflect the 'sn_customerservice_case' table.
(You may also need to update the 'Application' field depending on the Scope and testing)
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.


Thanks, Robbie