Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning ServiceNow

You're reading from   Learning ServiceNow Administration and development on the Now platform, for powerful IT automation

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher
ISBN-13 9781788837040
Length 388 pages
Edition 2nd Edition
Languages
Arrow right icon
Toc

Table of Contents (19) Chapters Close

Learning ServiceNow Second Edition
Contributors
Preface
1. The Interface FREE CHAPTER 2. Lists and Forms 3. UI Customization 4. Understanding Data and Relationships 5. Tasks and Workflows 6. UI and Data Policies 7. User Administration and Security 8. Introduction to Scripting 9. The Server-Side Glide API 10. The Client-Side Glide API 11. Server-Side Scripting 12. Client-Side Scripting 13. Service Portal Scripting 14. Debugging 15. Pro Tips Index

Client scripts


Client scripts are not the only example of client-side scripting, but they're probably the most ubiquitous (hence the name). A client script is a snippet of JavaScript that's sent from the server to the user's browser, to be executed client-side.

Keep in mind that any time a UI policy can effectively reproduce the desired functionality that you might otherwise use a client script for, it is best to use the UI policy. However, more advanced functionality often requires the use of more advanced conditions or functionality. That is where client scripts come in!

As a general rule, a well-written client script will return control of the browser to the user very quickly, and perform any server lookups asynchronously. This includes looking up properties from the server, performing GlideRecord queries, and handling time-zones.

Note

Pro tip

We've written a script specifically for handling time-zones in ServiceNow, both from server-side and client-side scripts! You can find this free tool...

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 £13.99/month. Cancel anytime
Visually different images