- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-25-2017 09:49 AM
After 8 hours; I am stumped trying to hide a button on a form.
I am aware of many solutions but none work in Jakarta for a custom scoped application.
It seems as though ServiceNow is moving away from custom scoped applications by limiting functionality and API availability.
Although I hope this is not the case...
I believe that I am limited to using the following APIs
- GlideAjax
- g_form
- GlideDialogWindow
There is a condition, but I want to simply hide a button before moving on to more complicated tasks.
The end goal is hiding a button based on Session language settings.
The condition is based on browser settings (g_lang), but I could not figure out how to write an if / else statement in the UI Action Condition field.
This is an example of the (working) client script I use with g_lang:
function onLoad() {
//Check session browser language settings
//Display u_music_language field for English settings
//Display u_music_idioma field for Spanish settings
if(g_lang == 'en'){
g_form.setDisplay('u_music_language', true);
g_form.setDisplay('u_music_idioma', false);
}
else if(g_lang == 'es'){
g_form.setDisplay('u_music_language', false);
g_form.setDisplay('u_music_idioma', true);
}
}
Thanks for your help and time,
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2017 02:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2017 11:53 AM
URL
https://dev10457.service-now.com/<https://dev10457.service-now.com/?_ga=2.54728299.1975948600.1511724454-798883617.1511724454>
Build
Jakarta
I am not sure where to find more detailed instance release data...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2017 12:14 PM
Hello Lon,
I've fixed this issue on your instance. Please check now.
FYI: I've inactivated the UI action button and created the new one + modified the client script.
I hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2017 12:37 PM
Thanks!
Works perfectly!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-26-2017 02:34 PM
You are very welcome. Thanks for participating in the community!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2018 10:13 AM
Could any of you please share the solution with me too? It will be very helpful to me.
Thanks
Sugandha