Servicenow instance Banner should always be present.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2024 05:04 AM
Hello ServiceNow Community,
We have a requirement regarding the visibility of the instance banner in our SN instance. According to a recent story, the instance banner should always be present. However, we’ve noticed that when a record is opened, either directly or via reference, the main instance banner is not visible. This is causing inefficiencies, as users must backtrack or open new browser tabs to navigate effectively.
As ITIL users, it’s crucial for us to have the instance banner always visible while working within the platform. After some investigation, we found a solution that involves manually enabling the banner through user preferences: navigating to Profile > Preferences > Display, and selecting “Always show top navigation.”
However, with 300 ITIL users, the client would prefer not to have each user make this change manually. We are looking for a script or any automatic solution that can enable this setting for all users across the platform.
Any suggestions or scripts that could help us automate this process would be greatly appreciated!
Thank you in advance for your support.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2024 05:16 AM
@jaymala_marathe This is usually controlled via glide.ui.polaris.ui16_tabs_inside_polaris preference.
Here is the script you should run to make this preference automated.
// Define the preference name and value you want to set
var preferenceName = 'glide.ui.polaris.ui16_tabs_inside_polaris';
var preferenceValue = 'true';
// Query all users
var userGR = new GlideRecord('sys_user');
//userGR.addQuery('user_name','IN','') provide list of comma separated user name for which you would like to update the preference
userGR.query();
while (userGR.next()) {
// Check if the preference already exists for the user
var userPrefGR = new GlideRecord('sys_user_preference');
userPrefGR.addQuery('user', userGR.sys_id);
userPrefGR.addQuery('name', preferenceName);
userPrefGR.query();
if (userPrefGR.next()) {
// Update existing preference
userPrefGR.setValue('value', preferenceValue);
userPrefGR.update();
} else {
// Create new preference
userPrefGR.initialize();
userPrefGR.setValue('user', userGR.sys_id);
userPrefGR.setValue('name', preferenceName);
userPrefGR.setValue('value', preferenceValue);
userPrefGR.insert();
}
}
// Log the completion
gs.info('User preferences updated for all users');
Please make sure to set the appropriate filter in addQuery to only set this preference for your intended user base. Also, please test this script via a background script or a fix script on a sandbox instance first. Once the changes are verified you can trigger the same script in your production environment.
Please don't forget to mark the response helpful and accepted solution.