AbstractAjaxProcessor undefined, maybe missing global qualifier error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2017 09:13 PM
Hi,
I am trying to query server for some required information and following product documentation but no luck facing lots of errors and need some expert insight, since it might be product release issue in Istanbul
script include
var ES_sA = Class.create();
ES_sA.prototype = Object.extendsObject(AbstractAjaxProcessor, {
initialize: function() {
var name = this.getParameter('sysparm_user_name').toString();
return "Hello " + name + "!";
},
client script
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var ga = new GlideAjax('ES_sA');
//ga.addParam('sysparm_name','helloWorld');
ga.addParam('sysparm_user_name',"Bob");
//ga.getXMLWait();
//alert(ga.getAnswer());
ga.getXML(HelloWorldParse);
function HelloWorldParse(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
alert(answer);
}
alert is returning null and error AbstractAjaxProcessor undefined, maybe missing global qualifier error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-12-2018 01:30 PM
Thanks, Donnie,
The global.AbstractAjaxProcessor was what I was missing. I am working in the HR Service Portal application was pulling my hair out to why my client script was not working haha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2017 09:23 PM
Hi Donnie,
Thanks much that worked for qualifier issue
any clue on 'conversion error', query is still returning null.
Thanks
Pankaj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2017 10:00 PM
Try this for your script include:
var ES_sA = Class.create();
ES_sA.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
helloWorld: function() {
var name = this.getParameter('sysparm_user_name').toString();
return "Hello " + name + "!";
}
});
And in your client script, un-comment this line:
//ga.addParam('sysparm_name','helloWorld');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2017 01:46 AM
Great! it worked. Thanks much i wrap toString was missing, i believe this change is very specific to Istanbul, documentation need to be updated

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2017 09:53 PM
Do you really want to use constructor? If not can you try renaming the function 'initialize' to something else & then adding a line as below
ga.addParam('sysparm_name','<function_name>'); below var ga = new GlideAjax('ES_sA');
Also make sure last line of your script include is as below i.e. a closing curly bracket & semi colon
};