- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 01:03 AM
Thanks Tony!!
what are the results of your debugging\testing? -- In the alert we are getting old value of category
what exactly is\is not working? - if we change category to software in the list and sub category changes to email then record should not submit to server. Script should check is it category is software or not, if yes, then the record should abort.
On cell edit Client script:
Field name: Sub category
Script:
function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
var saveAndClose = true;
//Type appropriate comment here, and begin script below
var ga = new GlideAjax('incidenttTable');
ga.addParam('sysparm_name', 'tablequery');
ga.addParam('sysparm_syssid', sysIDs);
ga.addParam('sysparm_newvalues', newValue);
ga.getXML(myid);
function myid(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
alert('ramya' + answer);
if (answer == 't1')
if (newValue == 'email')
alert('anns' + answer);
saveAndClose = false;
}
callback(saveAndClose);
}
Script Include: