Fields are mandatory when state changes from canceled.

spears49
Tera Contributor

I have an UI Action button to cancel cases with the ability to set the case back to 'Assigned', 'In Progress', or 'Pending' states. When these states are chosen for specific field values, fields that should not be mandatory are now mandatory before saving. How can I prevent this?

2 REPLIES 2

Wessel van Enk
Tera Guru
Tera Guru

Hi,

You need to check your UI Policies & Client Scripts, as it looks like there are some criteria that evaluate to true which are making the fields mandatory if you make the changes. Maybe the change also effects other fields and those can trigger the mandatory fields. 

 

If you really want to make sure you are not stopped by the mandatory fields, you can add a line of code to your UI Action: g_form.setMandatory('[Field name]', false);
But you would need to add this line for each field that becomes mandatory and still if the UI Policy is triggered after you save the changes, it won't work, as the UI Action changes are already completed. 

Anurag Tripathi
Mega Patron
Mega Patron

Is this something that has changed recently 

Or

it was always like this? 

-Anurag