OOB Approval Business Rule Fails for Non-Catalog Approvals Due to Direct cat_item Reference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago - last edited an hour ago
current.document_id.cat_item.toString();
This assumes that the source record always contains the cat_item field, which is not true for every table. As a result, when approvals are generated from tables that do not have a cat_item field, the script fails.
Because of this failure, the expected work notes are not updated for approvals originating from other source tables. Additionally, the logic appears to have been designed specifically around the sc_req_item table, making it dependent on fields that are not universally available across all approval sources.
I believe the Business Rule should either:
- Restrict execution to tables where cat_item exists (e.g., sc_req_item), or
- Include proper validation before accessing current.document_id.cat_item to avoid script errors for other source tables.
So what's your view on it?
Stay awesome,
Roshnee Dash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
I didn't find that BR in my PDI and also not in one of our vendor instances
seems it's custom BR and not OOTB
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
42m ago
Please let us know what plugin/application introduced this BR on your instance, since it's not on any of the instances I have access to.
Next to that: if there is a defect on something OOB, why not report it to NowSupport so they can fix it?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark