How to use ServiceNow JavaScript Executor

The client-side equivalent of a background script.

Hold Ctrl + Alt + Shift+ J

This will bring up the JavaScript executor.

You can now execute client side scripts. See https://developer.servicenow.com/dev.do#!/reference/api/tokyo/client/c_GlideFormAPI for examples.

One example: If a field is read only due to a client script or UI policy and you need to change the value, run the javascript executor to temporarily make the field editable.

g_form.setReadOnly(“field_name”,false);
Run my code


Leave a comment

Latest Posts