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

Dot-walking and GlideElement


As we learned in a previous chapter, dot-walking allows you to access fields on related records via a reference field (a type of field which contains a reference to another record), by chaining field names separated by dots. For example, to get the email address of the person to whom an incident is assigned from a business rule on the Incident table, you might use the following code:

var assigneeEmail = current.assigned_to.email.toString(); 

You might notice that we also used the toString() method in the preceding snippet. This is because, as we saw in the server-side Glide API documentation, fields accessed from server-side GlideRecords return GlideElement objects; not just values. JavaScript will generally coerce (sometimes referred to as casting) values to whatever datatype you're trying to use it as, but it is always best to explicitly convert values derived from GlideElement objects. Otherwise, you risk getting the wrong data type. Since GlideElement objects...

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