- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2025 11:22 AM
In UI Builder, I added a dropdown component. I would like to populate the items via script. In the script, I'm attempting to make a GlideAjax call but GlideAjax is underscored in red and said to be undefined inside the script. The Script Include getProductsLists is client callable. Currently there are no roles associated with the script. In viewing other posts, it appears that you should be able to use GlideAjax in UI Builder scripts. Need help to understand if I can use GlideAjax and if so, I do I get it to work
function evaluateProperty({api, helpers}) {
var ga = new GlideAjax('getProductsLists');
ga.addParam('sysparm_name' , 'getUniqueStatus');
........
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2025 04:35 AM
Hi @Renee-17
f you see GlideAjax is "undefined" and underlined in red in your UI Builder script, it's because GlideAjax is not available in the UI Builder scripting context. UI Builder scripts run in a modern browser-based JavaScript environment, not the legacy ServiceNow client scripting environment where GlideAjax is available. This is a common point of confusion for developers transitioning from classic UI scripts to UI Builder.
Find a working solution for your question at https://www.servicenow.com/community/developer-forum/call-script-include-from-ui-builder/m-p/2102346
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2025 04:35 AM
Hi @Renee-17
f you see GlideAjax is "undefined" and underlined in red in your UI Builder script, it's because GlideAjax is not available in the UI Builder scripting context. UI Builder scripts run in a modern browser-based JavaScript environment, not the legacy ServiceNow client scripting environment where GlideAjax is available. This is a common point of confusion for developers transitioning from classic UI scripts to UI Builder.
Find a working solution for your question at https://www.servicenow.com/community/developer-forum/call-script-include-from-ui-builder/m-p/2102346
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2025 05:02 AM
Thanks for the info!