The CreatorCon Call for Content is officially open! Get started here.

Agent workspace UI Action is not checking for mandatory field on form

Roshani
Tera Expert

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();

}

}
}

}

1 REPLY 1

abirakundu23
Mega Sage

Hi @Roshani ,

Have checked this option in UI action for workspace?

absnow1_0-1696137529034.png