When Assignment group changes on incident form, i want to make additional comments mandatory.

swathigangadhar
Tera Expert

When Assignment group changes on incident form, i want to make additional comments mandatory, But in UI policy there is no option when assignment group changes. So how can i achive this?

1 ACCEPTED SOLUTION

lSurya 24
Giga Guru

Hello Swathi,



You can write Onchange client script on assignment group,


So when it changes,


g_form.setMandatory('comments field name', true);



Hope this helps


View solution in original post

2 REPLIES 2

lSurya 24
Giga Guru

Hello Swathi,



You can write Onchange client script on assignment group,


So when it changes,


g_form.setMandatory('comments field name', true);



Hope this helps


Chuck Tomasi
Tera Patron

Without the changes option in a UI policy, you'll have to go with an onChange client script. Something like this (note this is untested and meant as an example). Place this on the Assignment group field.



function onChange(control, oldValue, newValue, isLoading, isTemplate) {


  if (newValue === '') {


      return;


  }


  g_form.setMandatory('comments', true);


}