Disabling client-side scripts

There may be times when we want to disable a particular client-side script. To do this, all we need to do is uncheck the Active field for the record. The script definition will remain in the system; however, it will not be attached to the form and execute.

For example, let us disable the Change short desc to title case client script. Open the appropriate record in the Studio using the application explorer on the left.

In the form that will open in the content area of the Studio, uncheck the active field and click on the Update button. Now when you change the Short description field, in the Booking Request form, the onChange client script will not execute, as it marked as inactive. We can mark it as active whenever ...

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.