- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2023 02:25 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2023 02:59 AM
@Alon Grod Please update your UI Action code as follows and it should work.
function myFunc(){
var glideAjax = new GlideAjax('alonTest');
glideAjax.addParam('sysparm_name','isTest');
glideAjax.getXML(responseCallback);
function responseCallback(respone){
alert('response received');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2023 02:49 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2023 03:01 AM
@Alon Grod Just responded with updated code in please check. I have tested it on my instance and it is working with the following code.
function myFunc(){
var glideAjax = new GlideAjax('alonTest');
glideAjax.addParam('sysparm_name','isTest');
glideAjax.getXML(responseCallback);
function responseCallback(respone){
alert('response received');
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2023 02:59 AM
@Alon Grod Please update your UI Action code as follows and it should work.
function myFunc(){
var glideAjax = new GlideAjax('alonTest');
glideAjax.addParam('sysparm_name','isTest');
glideAjax.getXML(responseCallback);
function responseCallback(respone){
alert('response received');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2023 02:57 AM - edited 10-01-2023 03:04 AM
HI @Alon Grod ,
Uncheck client checkbox and try below code by replace with your script include name and function name.
1. Server side UI Action ( 'Client' check box on the UI action is un-checked), Call like a server side function
var callServerClass = new aoneTest();
callServerClass.isTest();
2. Client side UI Action ('Client' check box on the UI action is checked), You can use glide Ajax
var ga = new GlideAjax('aloneTest');
ga.addParam('sysparm_name','isTest');
ga.getXML(HelloWorldParse);
function HelloWorldParse(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
alert(answer);
}
Thanks,
Anand