- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2019 03:32 PM
Hello
We are on Madrid version. Wanted to find out if it is possible to display error message when user tries to remove mandatory field on list view. We have ACL to restrict this mandatory field, but would like to display error message as well, if possible.
Please advise.
Thanks,
Rajan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2019 10:40 PM
Hi Rajan,
So you can do this using before insert/update business rule with condition as below
use your field name here
current.<field> == ''
Script:
gs.addErrorMessage('Field <fieldName> cannot be left blank');
current.setAbortAction(true);
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2019 09:58 PM
Hi,
we can show the error message on form but not on list.
Please refer below link to get more idea about it,
https://www.servicenowguru.com/scripting/business-rules-scripting/display-messages-ui-notification/
If my reply helps you at all, I’d really appreciate it if you click the Helpful button and if my reply is the answer you were looking for, it would be awesome if you could click both the Helpful and Accepted Solution buttons!
Regards,
Pratiksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2019 08:46 AM
Thanks Pratiksha for your response.
Yeah I agree with you, but wanted to find out if there is any workaround if anybody has found. 🙂
Thanks,
Rajan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2019 09:58 PM
Hello Rajan Mehta,
You can write before business rule..
suppose in incident form there is field priority.so the priority should be set according to impact and urgency.if we try to modify it directly from incident list view so it does not allow you to modify it.But no error message is given to the user.hence we can add error message in before business rule as follow: find the attachment..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2019 08:45 AM
hi Varsha,
Thanks for your response. What do you have on Action and Advanced tab on Business Rule? Can you please let me know? And is it working for list view?, because as far as I know, BR only works on forms.
Thanks,
Rajan