Agent workspace UI Action is not checking for mandatory field on form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 07:45 AM
Hi All,
I am working on UI Action for Agent workspace and setting the "state" field to closed complete . In native UI its checking for "assignment group" as mandatory field before it moved to "closed complete" but In Workspace Its not checking for mandatory field and setting the value of state to closed compelete.
My workspace client script as below:
function onClick(g_form) {
checkPositionData();
function checkPositionData() {
var hrTask = g_form.getDisplayValue("number");
var ga = new GlideAjax('sn_hr_core.NVS_H2O_CheckPositionData_new');
ga.addParam('sysparm_name', 'checkPositionData');
ga.addParam('sysparm_hr_task', hrTask);
ga.getXML(positionResponse);
function positionResponse(response) {
var answer = response.responseXML.documentElement.getAttribute("answer");
answer = answer.split(',');
if (answer[0] == "positionInComplete") {
alert(getMessage("Position interface is still not completed, please check later and close the task."));
return false;
} else {
g_form.setValue('state', 3);
g_form.save();
}
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2023 10:19 PM