Boost Your ServiceNow Productivity with These Handy Bookmarklets
ServiceNow bookmarklets are small JavaScript programs that can help you work more efficiently within the platform. In this post, we share some of our favorite ServiceNow bookmarklets, including tools for impersonating users, switching applications, cloning records, and inserting user information. Discover how these handy bookmarklets can boost your productivity.
ServiceNow is a powerful platform that helps organizations streamline their IT service management processes. However, navigating through the various menus and pages can sometimes be time-consuming. That's where ServiceNow bookmarklets come in handy. Bookmarklets are small JavaScript programs that you can save as bookmarks in your browser, allowing you to perform specific actions with just a click. In this blog post, we'll share some of our favorite ServiceNow bookmarklets that can help you work more efficiently.
1. Impersonate User
This bookmarklet allows you to quickly impersonate another user in ServiceNow, which is useful for testing and troubleshooting purposes. Simply click on the bookmarklet and enter the user's ID to switch to their account.
javascript: var id = prompt("Enter user id (e.g. abel.tuter)");if (id) { GlideURL.set("sysparm_user_id", id); GlideURL.set("sysparm_nostack", "true"); GlideURL.refresh();}
2. Switch to Global Application
If you frequently work with multiple ServiceNow applications, this bookmarklet can save you time by quickly switching to the global application scope. No more navigating through the application picker!
javascript: var url = window.location.href;url = url .replace(/nav_to.do/, "navpage.do") .replace(/sysparm_url_target/, "sysparm_direct") .replace(/(http.*?\.com\/).*?(\/.*)$/, "$1$2");window.location.href = url + "&sysparm_force_global=true";
3. Open Current Record in a New Tab
When you need to reference a record in a new tab, this bookmarklet comes in handy. It opens the current record in a new tab, allowing you to easily switch between different records or compare information side by side.
javascript: var url = window.location.href;var regex = /sys_id%3D([a-z0-9]+)/i;var match = regex.exec(url);if (match != null && match.length > 1) { var sys_id = match[1]; var url = window.location.origin + "/" + window.location.pathname.split("/")[1] + ".do?sys_id=" + sys_id; window.open(url, "_blank");} else { alert("No sys_id found in URL!");}
4. Clone Current Record
Sometimes you may need to create a copy of an existing record. With this bookmarklet, you can clone the current record with just a click, saving you the hassle of manually creating a new record and copying over the information.
javascript: var url = window.location.href;var regex = /sys_id%3D([a-z0-9]+)/i;var match = regex.exec(url);if (match != null && match.length > 1) { var sys_id = match[1]; var table = window.location.pathname.split("/")[1].replace(".do", ""); var clone_url = window.location.origin + "/" + table + ".do?sys_id=-1&sysparm_query=sys_id=-1^DUPLICATE_FROM=" + sys_id; window.open(clone_url, "_blank");} else { alert("No sys_id found in URL!");}
5. Insert Current User
When filling out forms or updating records, you often need to enter your own user information. This bookmarklet automatically inserts the current user's ID into the selected field, saving you time and reducing the chances of typos.
javascript: var elementNames = [ "assigned_to", "caller_id", "requested_by", "opened_by", "closed_by", "resolved_by", "user", "user_name",];var elementFound = false;for (var i = 0; i < elementNames.length; i++) { var elementName = elementNames[i]; var element = document.getElementsByName(elementName)[0]; if (element) { element.value = g_user.userID; elementFound = true; break; }}if (!elementFound) { alert("No matching element found!");}
In addition to the bookmarklets shared in this post, there are many more useful ServiceNow bookmarklets out there. To make it easier for our readers to discover and leverage these productivity-boosting tools, we'll be creating a dedicated page on our website to showcase a comprehensive list of ServiceNow bookmarklets.
Our upcoming "ServiceNow Bookmarklets Library" page will feature a curated collection of bookmarklets, organized by category and accompanied by brief descriptions of their functionality. We'll include bookmarklets for various tasks, such as navigation, record management, form filling, and more. This resource will be regularly updated as we discover and develop new bookmarklets to further enhance your ServiceNow experience.
Stay tuned for the launch of our ServiceNow Bookmarklets Library page, and get ready to take your ServiceNow productivity to the next level!
In the meantime, if you have any favorite ServiceNow bookmarklets that you'd like to see included in our library, please share them with us by messaging me on LinkedIn. We'd love to hear from you and learn about the bookmarklets that have helped you work smarter and faster in ServiceNow.