Book Image

Learning ServiceNow. - Second Edition

5 (1)
Book Image

Learning ServiceNow. - Second Edition

5 (1)

Overview of this book

This book is an updated version of Learning ServiceNow, that will cover the new and updated features of the ServiceNow platform. It will show you how to put important ServiceNow features to work in the real world, while introducing key concepts via examples of managing and automating IT services. It'll help you build a solid foundation of knowledge, and will demonstrate how to effectively implement and configure modules within ServiceNow. We'll show you how to configure and administer your instance, and then move on to building strong user interfaces and creating powerful workflows. We also cover other key elements of ServiceNow, such as notifications, security, reporting, and custom development. You will learn how to improve and automate your business' workflow and processes. By the end of this book, you will be able to successfully configure and manage ServiceNow like a pro.
Table of Contents (19 chapters)
Learning ServiceNow Second Edition
Contributors
Preface
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...