UI scripts

Let us now learn about another type of client-side script feature available in the ServiceNow platform, known as the UI script. The UI script is basically a bundle of JavaScript functions that may also include client-side Glide API calls.

The most important purpose of the UI script is to enable developers to create reusable code. The UI scripts are included and available in all the forms, list of record pages, and other modules. They can be referred to from any other client-side scripts, including the client script and UI policy. Because the UI script code is included in all the forms and page when marked Global, it is a recommended best practice to avoid creating a UI script unless it is really required.

As our intent is to create ...

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.