In Part I of our blog series, we explored 5 hidden or not-so-obvious features of the ServiceNow Platform that can be utilized by advanced users and system administrators. Now, let’s take a look at some out-of-the-box features geared towards developers or more experienced system admins.
1. Studio Code Search
If you’ve used ServiceNow’s Studio to develop custom applications, you’re probably already familiar with this feature. For system administrators, however, searching for code regardless of scope has never been easier. This is a fantastic feature if you’re looking for a particular code snippet (a class, a function, even a comment!), especially for something in the Global scope. To access the Code Search utility, navigate to the “Studio” module of the “System Applications” application menu. You’ll need to select an application first, but don’t worry you won’t be making any modifications to the custom app and you can change your scope later. In the top right side of the screen, select “Code Search”. In the box that appears, enter your search term and select the checkbox labeled “Search in all applications”.
NOTE: Don’t forget to change your scope back to what it was after the code search is complete.
2. Inbound REST API Explorer and Outbound REST API logging
Working with any system’s APIs can be challenging, but luckily ServiceNow has a couple of fantastic tools that make developing integrations a whole lot simpler. In addition to their comprehensive API documentation on their Developer site, ServiceNow also provides users with a unique tool to build and test inbound REST messages inside the ServiceNow platform. The REST API Explorer allows you to select any ServiceNow API and try out a GET, POST, PUT, DELETE, or PATCH call against data in the instance. To access the REST API explorer, you’ll need the rest_api_explorer or admin role.
For outbound REST messages, ServiceNow offers the Outbound HTTP Requests log, which lives under the “System Logs” application menu. Here you’ll find a list of all outgoing HTTP messages from the system, alongside the URL, response code, response body, and information about the ServiceNow source (Workflow, Scheduled Script, etc.) that initiated the HTTP request. Outbound HTTP logs are available for users with the web_service_admin role.
3. Stealth modify data with setWorkflow() & autoSysFields()
Making corrections to records in your database, especially in bulk, can be a problem if you have items such as Business Rules, Workflows, or Reports that are designed to take action when a record is updated. To sidestep this limitation, ServiceNow introduced two useful GlideRecord functions: setWorkflow() and autoSysFields().
setWorkflow() – Enables or disables the running of business rules, script engines, and audit. Pass in the Boolean “false” to disable objects that are designed to run after a record update. This function is available for Scoped applications.
autoSysFields() – Enables or disables the update to the fields sys_updated_by, sys_updated_on, sys_mod_count, sys_created_by, and sys_created_on. This is often used for manually updating field values on a record while leaving historical information unchanged. This function is NOT available for Scoped applications. Use this function with extreme caution and review the documentation carefully.
5. ServiceNow Style Guides and System icons
Although less relevant nowadays with the phaseout of the Content Management application and the decline of Jelly scripting in the system, understanding ServiceNow’s design elements is still a useful skill for designing UI Pages or Macros and other components of the default UI. ServiceNow has a couple of older pieces of documentation containing information about a variety of UI components and associated design principles: the ServiceNow Design System and the ServiceNow Styleguide. A handy addition to the ServiceNow instance is the Image Picker and Icon Library, which allow you to access system icons that can be referenced in client-side scripts.
To access the Image Picker, navigate to the following URL: https://INSTANCE.service-now.com/image_picker.do
To access the Icon Library, navigate to the following URL: https://INSTANCE.service-now.com/styles/retina_icons/retina_icons.html
Although the list of features in this blog post primarily focused on native platform features, there are a number of useful plugins that can be installed to optimize your instance even further. Check out our posts on Archiving and the Automated Test Framework to learn more, or check out the ServiceNow Store or Share sites.
Hopefully you learned something new for our list of tricks and hidden features for advanced ServiceNow system administrators and developers! What’s your favorite ServiceNow secret? If you’d like to learn even more ServiceNow tips and tricks, connect with the Covestic team at email@example.com. You can also check out another one of our ServiceNow tips and tricks blogs here.