AbstractAjaxProcessor undefined, maybe missing global qualifier error

p_bansal
Kilo Contributor

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

10 REPLIES 10

Torsten Stauch
ServiceNow Employee
ServiceNow Employee

In case anyone else comes across this issue, here's what solved it for me.

 

I was getting errors like:

Problem when trying to get a Rhino object: ConversionError: The undefined value has no properties.
and
org.mozilla.javascript.EvaluatorException: GlideRecord.setTableName - empty table name  

 

The problem is that you should not include the method initialize() in your Script Include. As per the docs...

 

Avoid overriding methods of AbstractAjaxProcessor, including initialize. 
While it is possible to invoke methods of your superclass object which you have overridden, 
it is complicated and best avoided altogether.

 

So just remove the initialize() method (or rename it if you have your code in that).

I hope this saves someone lots of debugging!

 

Docs: 

GlideAjax

https://docs.servicenow.com/bundle/orlando-application-development/page/script/ajax/topic/p_AJAX.htm...