Making attachments mandatory for subcategories
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hello,
I have a requirement to make attachments mandatory in the CSM workspace when specific Sub-Category is selected.
I have tried UI policies and Business rules but it is not working.
Can someone suggest me how to implement this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @gourabhishe,
can you share the UI policy and the corresponding actions that you created?
Business rule will not be the right way to achieve this. Instead try UI policy, Data Policy or Client script (depending on the exact process) and if you want to be applicable for form change only or list view as well...
please share more context
100 % GlideFather experience and 0 % generative AI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hello @gourabhishe ,
Use BR (Before-Insert) :
if (current.subcategory == '<sub-cat>') {
if (!current.hasAttachments()) {
gs.addErrorMessage('Attachments are mandatory for this sub category.');
current.setAbortAction(true);
}
}
If my response helped mark as helpful and accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
what BR you wrote?
what debugging did you do?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
