onLoad client scripts

Let us create a client script that will be executed when the form loads. For this, we need to specify a table in our instance; in our case, we will select the Booking Request table and specify the type as onLoad. The UI type field is to determine whether the script will be executed only on the Desktop UI, Mobile UI, or on both platforms. For our learning purposes, we will specify UI type as Desktop.

Marking a Global checkbox as checked makes the client script be associated with all form views of the selected table. If we uncheck the Global field, we can manually specify the name of a view to associate the script with. On the other hand, the Inherited field makes the script available to all the child tables that extend ...

Get ServiceNow Application Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.