Insights ServiceNow Shortcuts – Editor Macros

ServiceNow Shortcuts – Editor Macros

Editor Macros, found at “System Definition -> Syntax Editor Macros”, are code shortcuts that you can create in ServiceNow to automatically create code-blocks while in a script edito. For example, you can simply type vargr and hit the Tab key. This will create the code block for obtaining a GlideRecord.

There are a handful of useful macros that are available out of the box for creating a document header, info messages and for statements. But you can add as many as you like to make your life easier. A common one to add might be for an Ajax call:

Try them out and start using them on a regular basis and add more as you go along. If you can’t recall the available options, you can also just type help and hit Tab and that will list out all available macros along with a description. It’s the little things like this that make life easier!