- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2019 04:06 PM
HI , I have a requirement to make due date mandatory when state changes to submitted , I am trying to implement this with Business rule and UI action , can you please help me with this
Business rule: what should i write in advance script ?
UI action : up on clicking the UI action the due date will be mandatory and if due date is provided then it should submit and change state to submitted.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2019 05:17 PM
Hi kam,
Unfortunately there is no way to make a field mandatory through BR.
But you can do so through UI Actions and Data Policies (or only Data Polices)
So your UI action requires some minor changes -
So if you want to make a UI Action with Client - checked then you would have to do something similar as I did to run both client and server script.
As you can see on line 2, I was initially set the assigned to mandatory but that wont be required as well if you use Data Policy.
This will ensure that in anyway whenever the state changes to In-progress (for mine example) the Assigned To will be made mandatory.
So you can use both in combination - UI Action and Data Policy or Just the Data Policy. Unfortunately there is no BR method to implement the same.
Cheers,
Sam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2019 04:15 PM
Hi kam,
To make a field mandatory the best solution would be implement - UI Policies and Data Policies.
UI Policies - work on client/browser level
Data Policies - work on the Server level
So you can make a UI Policy - where condition would be same as the condition you were setting up in BR and UI Action, i.e. - State Changes to Submitted
Then inside the UI Policy you would get a related list to create a UI POlicy Action
Click on "New"
and select "Due Date" - Mandatory Column to True.
Same goes for Data Policy.
That should work.
Cheers,
Sam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2019 04:22 PM
This is a special requirement long story short we need br and UI action to make it mandatory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2019 05:17 PM
Hi kam,
Unfortunately there is no way to make a field mandatory through BR.
But you can do so through UI Actions and Data Policies (or only Data Polices)
So your UI action requires some minor changes -
So if you want to make a UI Action with Client - checked then you would have to do something similar as I did to run both client and server script.
As you can see on line 2, I was initially set the assigned to mandatory but that wont be required as well if you use Data Policy.
This will ensure that in anyway whenever the state changes to In-progress (for mine example) the Assigned To will be made mandatory.
So you can use both in combination - UI Action and Data Policy or Just the Data Policy. Unfortunately there is no BR method to implement the same.
Cheers,
Sam

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2019 05:41 PM
You can "enforce the population" of a field via Business Rules, but you cannot make it mandatory, ie preventing the user from leaving the UI via a Business Rule.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022