- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2021 07:10 AM
I want to write a business rule where the condition is:
Status is progress
In the script part I want to check whether the mandatory fields are empty or not. If empty it should show popup that "Please fill the mandatory fields" then update the mandatory fields manually and once the fields are filled manually after updating the status should change to Review.
Can anyone help me with the scripting part?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2021 07:19 AM
You can write OnSubmit client script and make mandatory or check if values are filled or not if state is progress.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
5x ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2021 07:19 AM
You can write OnSubmit client script and make mandatory or check if values are filled or not if state is progress.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
5x ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Instead of clamoring for credit, perhaps actually answer the original question - can you use a business rule to require all mandatory fields be populated. The method isMandatory only is of use on a form and there are many other ways clever users bypass constraints. Data Policies offers some hope but lacks the changesTo that BRs offer.
Sincerely,
Ron Hoyt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2021 07:22 AM
Hi,
Your question is not clear. If you set a field mandatory then user cant submit the form. The BR will get executed only if the form is submitted.
For your requirement I suggest UI Policy. ServiceNow has a default way to highlight whether a field is mandatory or not. Do you want to use custom script?
Thank you,
Palani
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2021 12:19 AM
Actually I have done it through client scripts. Anyhow thank you so much.
