Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
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 FREE CHAPTER 2. Developing Custom Applications 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

Client-side scripting


In many ways, Client Scripts are very similar to business rules, which, as we saw in the previous chapter, run in the instance. Both Client Scripts and Business Rules run JavaScript against a specific table, one record at a time. However, instead of triggering at database access, Client Scripts add interactivity to a form. When specific events happen on the page, such when a field changes, when the form loads, or when a UI Action is clicked on, the Client Scripts will be evaluated. These actions can all cause the JavaScript code of your choice to run. In the majority of cases, the scripts will use the GlideForm functions.

Client Scripts can run in four different scenarios:

  • onChange: When a field is edited in a form

  • onLoad: When the form is displayed in the browser

  • onSubmit: When a UI Action is clicked on in the form

  • onCellEdit: When a field is edited in a list

As with business rules and Script Includes, the platform gives a script template to use.

Tip

Client Scripts are supported...

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 $19.99/month. Cancel anytime
Banner background image