How do I disable the 'Toggle Template Bar' from the 'more options' menu.

shawnclune
ServiceNow Employee
ServiceNow Employee
I need help - if it's even possible - to disable (hide / remove) the menu option for "Toggle Template Bar" when a user is viewing a record in an application extended from the Task table.
 
I read KB0564223 (Cannot hide Toggle Template Bar option from the More Options men) and I'm able to disable the functionality of the template bar appearing - in this case, on the INC table - but the menu option still appears (see below).
 
My concern is it's going to confuse users thinking they can still toggle the template bar because they see the option in the menu - when in fact - it's truly been disabled for the Incident table.
 
Any ideas?
 
find_real_file.png
 
1 ACCEPTED SOLUTION

Willem
Giga Sage
Giga Sage

Create an Onload client script. Make sure Isolate script is set to false.

 

Use this code:

function onLoad() {
   document.getElementById('template-toggle-button').parentElement.hide();
}

 

The result:

Before

find_real_file.png

 

After

find_real_file.png

View solution in original post

6 REPLIES 6

rarootes1
Kilo Contributor

Willem,

I'm trying to implement this in a scoped application in the Madrid release, and having no luck. Do you know of any special that might be required to work with this solution?

Best,

Rick

Hi Rick,

 

Scoped apps do not have the same API's available (especially when DOM-manipulating as described here).

This article gives a good description and also talks about an option to re-enable:

Most of the inaccessible APIs can be re-enabled on a per-application basis. To do so, you need to ship a True/False system property in your application named glide.script.block.client.globals with the value false. As with all system properties in a Scoped Application, the name of the property will automatically have your application's scope name prefixed to it- you don't need to do that yourself.

Reference: https://community.servicenow.com/community?id=community_blog&sys_id=788c66e1dbd0dbc01dcaf3231f961969

 

Currently not able to try this, but give the article a go and let us know. Hope this helps! 🙂