How to make a Glide Ajax call in Workspace Client Script ?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
13 hours ago
function onClick(g_form) {
g_modal.confirm("Confirm", "Are you sure ?", function(response) {
doSubmit();
}, {
cancelTitle: "Cancel",
confirmTitle: 'Confirm'
});
function doSubmit() {
console.log("doSubmit"); <= can console log
var ga = new GlideAjax('uiBuilderAction');
ga.addParam('sysparm_name', 'cancelIncidentIncident');
ga.addParam('sysparm_id', g_form.getUniqueValue());
ga.getXMLAnswer(function(response) {
if (response) {
var result = response;
if (result != 'success') {
g_form.addErrorMessage('Error: ' + result);
} else {
g_form.save();
}
} else {
g_form.addErrorMessage('No response from server or invalid response.');
}
});
}
}
Error meg:
POST https://dev306480.service-now.com/xmlhttp.do 404 (Not Found)
Unhandled exception in GlideAjax. undefined
Error meg:
POST https://dev306480.service-now.com/xmlhttp.do 404 (Not Found)
Unhandled exception in GlideAjax. undefined
0 REPLIES 0
