- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2017 09:02 AM
I am new to ServiceNow development and this is my first post.
I am trying to use a custom field as optional in a form, but the field is marked as Mandatory in Dictionary.
Can someone help me with a way to do that?
Also, what is the best practice?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2017 09:17 AM
If it is mandatory in the dictionary, there's no overriding it from a client script or UI policy. You'll need to uncheck mandatory in the dictionary (or a dictionary override if the field is on a base table like task) and then use a UI policy to make it mandatory when you need, and not when not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2017 09:16 AM
You need to update the dictionary to make it not mandatory. Then you will need to update any page that displays the field to run a ui policy or client script to make the field mandatory in the appropriate situations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2017 09:17 AM
If it is mandatory in the dictionary, there's no overriding it from a client script or UI policy. You'll need to uncheck mandatory in the dictionary (or a dictionary override if the field is on a base table like task) and then use a UI policy to make it mandatory when you need, and not when not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2017 09:48 AM
Hello Leo,
Even if the field is set to mandatory via a dictionary, we can override the mandatory values via client script or UI policies i.e create a UI policy and set the mandatory field to false per condition filter on your table.
Please let me know if you have any questions.
