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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.