Code Search using Chrome custom search engine

Chrome Edit Search Engine

Do you often find yourself looking for a piece of code in a Servicenow instance?

A couple of options were discussed in the post Code Search using Studio IDE without Applications.

On this occasion, I’m going to share an even better approach based on this wonderful tutorial by SN Pro Tips. Find your code faster with a custom search engine in Google Chrome!

Creating the Custom Code Search Engine

Go to Settings -> Search engine -> Manage search engines -> Add

Chrome Edit Search Engine

The URL

https://<instance>.service-now.com/sys_metadata_list.do?sysparm_query=123TEXTQUERY321LIKE%s%5EGROUPBYsys_class_name
  • sys_metadata: Application File table. Configuration records that allow developers to extend application functionality (i.e. Business Rules, Client Scripts, Script Includes…).
  • sysparm_query=123TEXTQUERY321LIKE: Equivalent to “Search for text” / “Keywords are”
  • %s: It will be replaced by the search term
  • GROUPBYsys_class_name: Group the results by table (i.e. Business Rules, Client Scripts, Script Includes…).

Custom Code Search Engine in action

  1. Open a new tab
  2. Type your keyword
  3. Press tab key
  4. Type your search term
  5. Press enter key

Application Files Search Engine