OnLoad Client Script Not Executing on a Specific Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 07:54 AM
Hi Everyone,
I am experiencing an issue where an onLoad client script is not executing on a particular table in my ServiceNow instance. I've followed various troubleshooting steps, but the script still does not run.
Steps Taken:
Script Activation:
- The client script is active (active checkbox is checked).
Table and View Configuration:
- The client script is set to the correct table and view.
Script Syntax and Errors:
- No syntax errors found in the script. Added logging and alerts for debugging.
Script Scope and Permissions:
- The script is in the correct application scope and has necessary permissions.
Client Script Type:
- The script type is set to onLoad
Form and UI Policy Conflicts:
- Checked for other client scripts (OnChange is working fine on the same table) and UI policies that might conflict, but found none.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 08:22 AM
@Saraswathi Devi Thanks a lot for sharing the steps you already verified. Now please verify the following.
1. UI Type: Please check if the UI Type is set to ALL or it is set to a value which is aligned with the platform on which you are testing
2. Script: Please see if there is any incorrect syntax within your client script which is causing your script to crash.
3. return statement: Please check if there is any return statement at the beginning of the script which is not letting the rest of the code to execute.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 10:15 PM
Hi @Sandeep Rajput ,
I have set the UI type to All and I have tried only the info message line. Onchange client script is working fine on this table.
And the same script is working on another Table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 11:55 PM
@Saraswathi Devi This looks like a caching issue to me now. Please test this form again in an incognito window and see if the message appears on the form.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2024 02:04 AM
@Saraswathi Devi I have sent you a message on community inbox. Please check.