GlideAjax.getXMLWait is no longer supported
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2022 04:41 AM
Hi,
Getting below error after submit the catalog request through portal. Is there is any work around to resolve this?
Error:
There is a java script console error in your browser
GlideAjax.getXMLWait is no longer supported
Thanks
Srini
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2022 04:44 AM
Hello,
Your answer is in the below article:-
https://community.servicenow.com/community?id=community_article&sys_id=e37f2072db9fd0103daa1ea6689619c6
Please mark answer correct/helpful based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2022 05:51 AM
Please try below:-
function onSubmit() {
// //Type appropriate comment here, and begin script below
// //Type appropriate comment here, and begin script below
if (g_scratchpad.isFormValid)
return true;
var existingList = g_form.getValue('ritm_ex_user');
var compList = g_form.getValue('visitor_details');
alert("$$Existing List:: " + existingList);
alert(compList);
// var remUser = [];
// var newUser = [];
// //g_form.getValue("request_number");
// // alert("BJ Onchange");
// //Type appropriate comment here, and begin script below
var arrNew = [];
var fetchExistList = g_form.getValue('ritm_ex_user');
var newList = g_form.getValue('visitor_details');
//alert("Existing List ..." + fetchExistList);
//alert("New LIst::" + newList);
//var ritmId = this.getParameter('sysparm_ritm');
arrNew = newList.split(',');
var exList = [];
exList = fetchExistList.split(',');
var remUser = [];
var newUser = [];
var matches = "";
for (var i = 0; i < exList.length; i++) {
matches = "false";
for (var e = 0; e < arrNew.length; e++) {
// alert("In the for loop..." + exList[i] + "...." + arrNew[e]);
if (exList[i].trim() == arrNew[e].trim()) {
matches = "true";
//gs.addInfoMessage(exList[i] + ".rem.." + arrNew[e]);
// alert("Existing Matching Sys ID..." + exList[i] + '...' + arrNew[e]);
}
}
if (matches == "false") {
remUser.push(exList[i]);
// alert("$$ Remove User::" + exList[i]);
//gs.addInfoMessage("$$ Remove User::" + exList[i]);
}
}
//gs.addInfoMessage("$$ Remove User:::::" + remUser.toString());
//this._cancelDACUserTasks(ritmId, remUser.toString());
var matchesNew = "";
for (var j = 0; j < arrNew.length; j++) {
matchesNew = "false";
for (var k = 0; k < exList.length; k++) {
if (arrNew[j].trim() == exList[k].trim()) {
//gs.addInfoMessage('$$...' + arrNew[j] + '...' + exList[k]);
matchesNew = "true";
}
}
if (matchesNew == "false") {
newUser.push(arrNew[j]);
// alert("New User...." + arrNew[j]);
// gs.addInfoMessage("$$ New User.." + arrNew[j]);
}
}
//alert("Removed users list.... " + remUser.toString());
//alert("New users list...." + newUser.toString());
g_form.setValue('new_visitor_details', newUser.toString());
g_form.setValue('removed_vistor_details', remUser.toString());
alert("Removed User List::" +remUser.toString());
var ga = new GlideAjax('DacTaskUtils');
ga.addParam('sysparm_name', 'processDACTasks');
ga.addParam('sysparm_existList', fetchExistList);
ga.addParam('sysparm_newList', newList);
ga.addParam('sysparm_ritm', g_form.getValue("request_number"));
ga.getXMLAnswer(setAnswer);
return false;
function setAnswer(answer) {
if (answer) {
alert("answer");
//g_form.setValue('ritm_ex_user', answer);
}
var actionName = g_form.getActionName();
g_scratchpad.isFormValid = true;
g_form.submit(actionName);
}
}
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2022 08:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2022 04:47 AM
Hi,
yes you need to use Asynchronous Ajax call
Please share your scripts
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader