- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2022 09:57 PM
Hello.
I get an error with "Glide Ajax" in a scoped application. It was output as follows in the system log.
(I got this error in the service portal, but not in UI16.)
”Script: AjaxTest not found in scope: global, and HTTP Processor class not found: com.glide.processors.xml http.AjaxTest: no thrown error”
Do script includes have to be created globally even in scoped applications?
I would like to know how to avoid this error.
【Code where the error occurred】
function onCondition() {
var dData = [];
var ajax = new GlideAjax('AjaxTest');//An error occurred here
ajax.addParam('sysparm_name', 'getJson');
ajax.getXMLAnswer(function(answer) {
dData = JSON.parse(answer).array;
});
}
【Scope etc.】
Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2022 11:33 PM
Hi,
It seems that both your script and UI policy are in same scope "TEST_APP" which is correct. But when you called your script include using Ajax call you simply defines script include name only.
For custom calls you need to use the API namespace, replace your code as below.
var ajax = new GlideAjax('x_******AjaxTest');//API name
Note: Also check in script include accessible from "this application scope" to "All" if you have any issue.
Mark this as Helpful/Correct, if Applicable.
Regards,
Sourabh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 12:51 AM
I guess Maybe it's because there's a script include with the same name in your environment

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2022 11:33 PM
Hi,
It seems that both your script and UI policy are in same scope "TEST_APP" which is correct. But when you called your script include using Ajax call you simply defines script include name only.
For custom calls you need to use the API namespace, replace your code as below.
var ajax = new GlideAjax('x_******AjaxTest');//API name
Note: Also check in script include accessible from "this application scope" to "All" if you have any issue.
Mark this as Helpful/Correct, if Applicable.
Regards,
Sourabh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 01:48 AM
I changed the problem part as follows and changed the "accessible from" of the script include to all, and it was solved.
var ajax = new GlideAjax ('x_794558_test_app.AjaxTest');
Thank you very much. It was helpful.