Mandate Additional Comments

Community Alums
Not applicable

Hi,

Iam trying to make Additional Comments mandatory when incident state is cancelled. For this i created UI Policy with condition State is Cancelled and UI action where additional comments are mandatory true.

 

But it is allowing incident form to save and then additional comments are becoming mandatory, how to make it mandatory before saving the form using this UI Policy

5 REPLIES 5

ritu_saluja
Tera Expert

@Community Alums  you should write on change client script:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if (newValue == 8 ) { //Cancel State back end value
g_form.setMandatory('comments', true);
} else {
g_form.setMandatory('comments', false);
}
}
Please mark my answer correct and helpful if it helps you