Issue with onLoad Client Script Alert in Australia Version
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi everyone,
I am facing an issue in the latest Australia version of ServiceNow. While writing a Client Script with the "onLoad" type, I am not getting the alert message in the browser.
Could anyone please guide me on how to resolve this issue?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hello @gavarlamoun ,
Here are a few things you can check to resolve it:
1. Verify the Client Script configuration
- UI Type = `All` or correct UI experience
- No condition preventing execution
2. Check if you are using Workspace / Next Experience
In Agent Workspace or Next Experience, traditional alert() behavior can be inconsistent or blocked. Try using: g_form.addInfoMessage("Test message"); instead of alert().
3. Open Browser Developer Console
Press F12 - Console tab and check for JavaScript errors. Another script error may be stopping execution.
4. Clear cache
5. Check Isolate Script setting - If “Isolate script” is enabled, try disabling it temporarily for testing.
If this helps, kindly mark the answer as helpful/correct.
Thanks,
Priyanka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you didn't share the client script config screenshots
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @gavarlamoun,
Please share the screenshot of the client script, so that will help you.