How to set more fields as mandatory when clicking on 'Resolve'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2023 07:58 AM
hi,
I have the field system_failute (True/false) on the incident table. I have a requirement that when the user click on the ui action 'Resolve' in the SOW, more fields should become mandatory in addition to close_code and close_notes. How can I achieve that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2023 08:41 AM - edited 09-03-2023 02:31 PM
Hi Alon,
Use: g_form.setMandatory('[field_name], 'true');
In the UI Action script for "Resolve" on your table.
As is done in the "Reopen Incident" UI Action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2023 11:15 PM
Hello Alon Grod,
When you click on "Resolve" button the "state" field get set to "Resolved".
You can just create "UI Policy" on incident table with condition "State=resolved" and create UI policy action to make other fields mandatory.
Here in my case I have made description field mandatory if we click on "Resolve"
Output :
When state is not resolved ,Description is not mandatory
When I click on Resolve button description is mandatory.
Hope this will help you..!!
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2023 11:47 PM
Hi @Alon Grod,
You can simply add 2-3 lines added to set fields mandatory based on requirement in the script field as shown below in the UI action "Resolve".
This would surely resolve your concern easily. Please mark this answer as correct ✔️and Helpful👍.
Happy to help you ahead.
Thank You,
Rajesh Bhise

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2023 11:34 PM
@jaheerhattiwale - Thanks for the support.
@Alon Grod - Could you please review my solution and do the following ?
Please mark this answer as correct ✔️and Helpful👍
Thank You,
Rajesh