-
Book Overview & Buying
-
Table Of Contents
ServiceNow Cookbook
By :
A background script is a place where you can test your server-side scripts, which is same as free text box. To access the background script, you should have a security_admin role with elevated privileges.
To step through this recipe, you should have an active Service-Now instance, valid credentials, and a security admin role.
Open any standard web browser and type the instance address.
On the left-hand side, type background in the search box and Service-Now will search the module for you.
Click on the Scripts - Background module under System Definition application, as shown here:

Background script module
Now you will be able to see the following screen, where you can place your code and click on the Run script button:

Run script
Service-Now has an inbuilt gs.print() function, which is used to view the output of the script and it also write an entry in a log file, but the gs.log () functions in write an entry in the system log and log file...