Writing a script to make a field mandatory when Closing a Case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2022 09:48 AM
I am trying to write a script on a UI Action that sets a field as mandatory when you click Close Complete on a case. The field is a string with drop down options of yes and no. If a selection is not made and the fulfiller tries to close the case I want it to give them an error message.
Below is my UI Action and script so far. Am I on the right track?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2022 10:20 AM
Hello Rylie,
Create a UI policy and UI policy action on the state field to set the yes/no field as mandatory when state is set to Work in progress or which ever state the request usually sits in before Close Complete.
Hopefully this works for you.
Regards,
Abhinay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2022 01:14 PM
Hello,
This did work for me, however, the only problem is that it won't let the fulfiller suspend the case because the fields are mandatory. Do you know of any ways I could get around this? I want them to be able to suspend, just not close.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2022 02:04 PM
Hello Rylie,
The quickest suggestion on top of my head:
If you are suspending the case by selecting the state "Suspended" in drop down, than another UI policy and subsequent policy action on state field, if "State" is suspended, set yes/no field as not mandatory and reverse false.
If this does not work, please let me know how exactly a case is being suspended in your instance.
Hope his works.
Regards,
Abhinay