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 09:59 AM
HELLO
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2022 10:08 AM
Hi
What braces need to be removed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2022 10:30 AM
hello
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2022 11:17 AM
Hi
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.