GlideAjax / application scopes

mathieu_brule
Mega Sage

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 ?

8 REPLIES 8

Hi,

Don't use Insert and stay

Create fresh script include with another name and test once

Regards
Ankur

Anil Lande
Kilo Patron

HI,

Please check cross scope privilege's.

find_real_file.png

 

You should have above configuration in place for your application scope.

 

Thanks,
Anil Lande

I have tried too, but not better 😞

 

Below my config screenshots :

 

find_real_file.png

 

 

find_real_file.png

 

Did I miss anything ?

Thanks for your help...

I've modified the Source scope to "Customer Service", which is my catalog client script application, but still KO 😞