How to make Resolution code mandatory if a specific category is selected?

Jesus Nava
Tera Guru

Hello experts, please I need your guidance, I'm working with the case form for CSM, I was asked to add more categories to the "category" field

JesusNava_0-1675190083062.png

the idea is that when the user selects a specific category in this case called "ServiceDesk", and tries to close the case, the "Resolution code" becomes mandatory, just for that category, not for the rest(there are other 5 ). The issue I have is that I created a UI policy, to make it mandatory when the category is "ServiceDesk"

JesusNava_1-1675190468262.png

but at the time I use the UI action OOB called "close case" it does not make the field mandatory.

If I remove the condition "state" in thr UI policy, everytime I want to save the record, it asks for the mandatory field.

How can I make it work so that only when categoty "servicedesk" is selected the "resolution code" becomes mandatory?

Thank you

 

2 REPLIES 2

SatyakiBose
Mega Sage

Hello @Jesus Nava 

Why are you adding a condition for State is Closed in the UI Policy.

The UI action - Close Case is supposed to change the state to closed.

I believe the UI policy is configured incorrectly.

Simply adding a condition, Category is ABC in the condition, and the setting the UI policy action to make the resolution code field mandatory will do the job.

Jesus Nava
Tera Guru

Thank you all, here is the solution of my issue:

1. I made a copy of the OnLoad client script that sets this fields mandatory.

2.Using the copy, I added the condition if the category was ServiceDesk to make the field "Resolution code" mandatory.

3. Deactivated the OOB client script.

and that worked,

Thank you!