i am not getting any alerts on glide ajax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 10:16 AM
Hi,
Can you please let me know why my alert is not getting triggered?
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
alert("inside ajx");
var get_Caller_Details = g_form.getValue("caller_id");
var ga = new GlideAjax("multiple_Autopopulate_Class");
ga.addParam("sysparm_name","multiple_Autopopulate_Function" );
ga.addParam("sysparm_id", get_Caller_Details);
ga.getXML(callBackFunction);
function callBackFunction(response){
var answer = response.responseXML.documentElement.getAttribute("answer");
alert("response is " + response);
alert("answer is " + answer);
}
}
var multiple_Autopopulate_Class = Class.create();
multiple_Autopopulate_Class.prototype = Object.extendsObject(AbstractAjaxProcessor, {
multiple_Autopopulate_Function: function() {
var parm = this.getParameter("sysparm_id");
var gr = new GlideRecord("sys_user");
gr.addQuery("sys_id", parm);
gr.query();
if (gr.next()) {
return gr.email + ", " + gr.location + ", " + gr.manager;
}
},
type: 'multiple_Autopopulate_Class'
});
Regards
Suman P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 10:34 AM
Hello @Community Alums
Can you tell specifically which alert is not triggering?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 10:35 AM
none are triggering from ajax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 10:41 AM
Hi @Community Alums ,
Modify below script in script include
var result = gr.email + ", " + gr.location + ", " + gr.manager;
return result;
}
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2023 10:44 AM
Still no luck Anand