Mandate Additional Comments

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2023 03:33 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2023 03:17 AM - edited 03-17-2023 03:17 AM
@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