Writing a script to make a field mandatory when Closing a Case

Rylie Markle
Tera Contributor

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?

 

find_real_file.png

 

 

find_real_file.png

12 REPLIES 12

Mohith Devatte
Tera Sage
Tera Sage

HELLO @Rylie Markle ,

YES THIS MUST BE CORRECT 

just remove the braces in the condition and that should be fine 

let me know if there are any issue or if its not working 

please mark my answer correct if it helps you

Hi @Mohith Devatte ,

What braces need to be removed?

hello @Rylie Markle ,

replace your condition like below

current.hr_service="your hr service sys_id"

rest every thing looks good to me 

are you stuck at some thing in the script ?

if yes let me know

please mark my answer correct if it helps you

Hi @Mohith Devatte ,

My script is working now, thank you. The only problem is I now have 2 Close Complete buttons instead of just 1. I need to get rid of the other button without messing up any of our other services. I tried adding a condition on the below UI Action but it changed the way the button worked in other services. find_real_file.png