Running background scripts

The simplest place to experiment with server-side scripting is perhaps the Background Scripts section in ServiceNow. This provides you with a large text box in which you place your code and a button saying Run Script, without any fuss, formatting, or further complexity. Outputs from your session during execution (such as log statements) are captured and presented to the screen. This, therefore, provides an excellent place to run server-side code where you need to monitor the results, where you can experiment, or where you need to run one-off scripts.

Navigate to Background Scripts by going to System Definition > Scripts (Background).

You will be presented with a large script box; however, before you get too enthusiastic, ...

Get ServiceNow: Building Powerful Workflows now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.