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

GlideUser (g_user)

The GlideUser object is available to client scripts as the g_user object, which is initialized to the current user that's signed in.

The GlideUser client-side API gives you easy access to determining certain details about the user, including the user's name, roles, sys_id, and a method for getting access to client data set via the putClientData() API on the server.

The GlideUser (g_user) API is particularly useful because it eliminates the need to execute client-side GlideRecord queries to retrieve this information, which are costly in terms of performance or slow in terms of execution time.

Getting user details

A fair amount of the user's profile details can be gleaned from the GlideUser (g_user) API, as they are cached when the page is loaded.

There is a method to access the user's full name: getFullName(). This method accepts no arguments, but returns a string containing the current user's full name.

The user's first and last name are available via properties of the g_user...