Blog

Bookmark Administration

The ServiceNow bookmark functionality allows users to keep track of commonly used lists and important records.

Bookmarks are often maintenance-free, however there are a couple improvements that can help add additional value to bookmarks.

Adding a Global Bookmark

Adding a global bookmark is easy and can be used to show users links to important sites at your company like other IT applications like Office365, Sharepoint, Jive, Yammer, etc.  Another good idea is to add a global bookmark for ServiceNow training.

How to add a global bookmark

  1. Go to System Definition > Bookmarks
  2. Click New
  3. Add a new bookmark with User field blank and "Auto add" = true.  Look at other bookmarks for examples
  4. Login with a user that has never logged in before and verify the user sees the bookmark
  5. Add your global bookmark to an update set or export to xml to move between a development and production ServiceNow instance

Adding a new global bookmark to existing users

Users that have logged into ServiceNow before will have their bookmarks already set.  To add your new global bookmark to these users, you can use a background script.

Use background - scripts to run this script.  Always test in a development instance first!

bookmarkSetup();
function bookmarkSetup() {
var grBookmark1 = new GlideRecord("sys_ui_bookmark");
grBookmark1.addEncodedQuery('title=Bookmark and pane-based UI help');
grBookmark1.query();
gs.print('grBookmark1 Query: ' + grBookmark1.getEncodedQuery() + ' = ' + grBookmark1.getRowCount());
while (grBookmark1.next()) {
var grBookmark2 = new GlideRecord("sys_ui_bookmark");
grBookmark2.initialize();
grBookmark2.url ='<your url here>'; //Replace with your url
grBookmark2.title = '<your title here>'; //Replace with your title
grBookmark2.order = '1';
grBookmark2.flyout = 'false';
grBookmark2.icon = 'icon-power color-red'//Can change the icon here
grBookmark2.open_in_form = 'true';
grBookmark2.pinned = 'true';
grBookmark2.flyout_sizing = 'body';
grBookmark2.uncancelable = 'false';
grBookmark2.image = 'images/icons/help.gifx';
grBookmark2.user = grBookmark1.user;
//grBookmark2.insert();
}
}

You will have to update <your title here> and <your url here> in the script.  Also uncomment out the grBookmark2.insert() line when you are ready to do the insert.

Deleting a bookmark for all users

You can also delete a global bookmark if you need to.  A common bookmark to delete is Bookmark and pane-based UI help as it takes up extra real estate on the edge bar.

Use background - scripts to run this script.  Always test in a development instance first!

bookmarkDelete();
function bookmarkDelete() {
var grBookmark1 = new GlideRecord("sys_ui_bookmark");
grBookmark1.addEncodedQuery('title=Bookmark and pane-based UI help');//Adjust as needed
grBookmark1.query();
gs.print('grBookmark1 Query: ' + grBookmark1.getEncodedQuery() + ' = ' + grBookmark1.getRowCount());
while (grBookmark1.next()) {
//grBookmark1.deleteRecord();
}
}

Changing default bookmark color and icon

Here is another article that describes how to change the default bookmark icon and behavior

Good luck with your bookmarks!
Mike