Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering ServiceNow

You're reading from   Mastering ServiceNow Unleash the full potential of ServiceNow from foundations to advanced functions, with this hands-on expert guide fully revised for the Helsinki version

Arrow left icon
Product type Paperback
Published in Oct 2016
Publisher Packt
ISBN-13 9781786465955
Length 656 pages
Edition 2nd Edition
Arrow right icon
Author (1):
Arrow left icon
Martin Wood Martin Wood
Author Profile Icon Martin Wood
Martin Wood
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. ServiceNow Foundations 2. Developing Custom Applications FREE CHAPTER 3. Server-Side Control 4. Client-Side Interaction 5. Getting Things Done with Tasks 6. Events, Notifications, and Reporting 7. Exchanging Data – Import Sets, Web Services, and other Integrations 8. Securing Applications and Data 9. Diagnosing ServiceNow – Knowing What Is Going On 10. Packaging with Applications, Update Sets, and Upgrades 11. Making ServiceNow Beautiful with Service Portal and Custom Interfaces

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, heed the warning shown. The reason that accessing background scripts requires elevated privileges is to remind you that some badly written code can, in fact, delete all your data. Never experiment in a live production instance!

Running background scripts

Tip

Inefficient...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime