UI Scripts are not working within Workspaces in Xanadu Environment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 05:11 PM
Hello community,
I am trying to create a script for workspace navigation, but it is not working specifically in a Xanadu environment. I tested the same script in a Washington DC environment and it worked correctly. For testing, the script is just meant to console log "hello world", and is as follows:
(function () {
try {
console.log("Hello world!!!!");
} catch (error) {
}
function initialiseScript() {
// do nothing
}
return initialiseScript;
})();
This is the configuration of the script:
In a DC environment, I see this:
But in the Xanadu environment the console log does not work correctly.
When trying to debug to see why this might be the case, I found that UI Scripts just don't even get called from the Xanadu instance within workspace navigation.
This is the information held by the UI Scripts objects for Washington DC env:
This is the information held by the UI Scripts objects for Xanadu env:
You'll notice in the screenshots that the UI Scripts populate correctly for DC but not for Xanadu. Is there an issue in the way I might be configuring my Xanadu instance? Is there a setting that I need to switch on to allow UI scripts to work correctly? I provisioned the DC environment in the identical manner, so I don't see why it shouldn't work for Xanadu.
Is this a known issue, and, if so, is there an ETA for when UI Scripts will work in Xanadu workspace/portal navigation?
FYI This is specifically happening for workspace navigation. It's working correctly with "Desktop" scripts in classic.
Thanks in advance! Please let me know if there is any further information I can share.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 03:18 PM
Any updates or advice that the community can offer here?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2024 05:51 PM
I’m not certain about the cause of this behavior, but it could be related to security. If you can provide more details about the business requirement, I’ll be in a better position to help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2024 10:10 AM
Hi Marc, this is occurring in a regular developer instance (provisioned through developer.servicenow.com).
The business requirement is that there is another UI script that we're trying to make sure works in the dev instance, but that more complicated one was not working. So we tried this console.log("Hello World") script in both a Washington DC and Xanadu environment - it's working in the DC release, but not in the Xanadu release. Xanadu instance doesn't seem to even load any UI scripts that are marked as "Mobile/Service Portal" for their UI type. Please see screenshots above for a better idea of this behavior.
Is there more info you might need? Not sure if you already had the chance to try the script on a Xanadu instance on your end.