GlideAjax / application scopes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 06:14 AM
Hi everyone !
I'm actually facing an issue, I really can't understand : I'm trying to call a script include with Glide Ajax, but it doesn't work... I'm in a catalog client script, set in Customer Service application scope, which calls a script include, in global application, set on Accessible for all.
To make it simplier to analyse, my script include just returns "test" value :
My catalog client script (CustomerService application) :
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var ga = new GlideAjax('global.Test');
ga.addParam('sysparm_name', 'testMethod');
ga.getXML(function(response) {
var test = response.responseXML.documentElement.getAttribute("answer");
alert("test " + test);
});
}
My script include (global and accessible from All application scope) :
var Test = Class.create();
Test.prototype = Object.extendsObject(AbstractAjaxProcessor, {
testMethod : function() {
return "test";
},
type: 'Test'
});
My alert message, in my callback function, returns ... null...
Could anyone explain me what's happening ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 07:47 AM
Hi,
Don't use Insert and stay
Create fresh script include with another name and test once
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 07:22 AM
HI,
Please check cross scope privilege's.
You should have above configuration in place for your application scope.
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 07:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2022 07:44 AM
I've modified the Source scope to "Customer Service", which is my catalog client script application, but still KO 😞