adding an attachment to an existing record is not triggering a business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2014 11:56 AM
Hello all, I discovered a while back that business rules only trigger on updates if servicenow believes the record has changed.
That appears to be causing me a problem with attachments. I have a field on my table that has to be zero if there are no attachments, and has to be non zero if there are attachments. Easy enough to do with a business rule, and it works great when the attachments (or lack thereof) are added when the record is created.
However, if I create the record, save it, then add an attachment but don't change anything else, the business rule isn't firing, because the parent record didn't change.
Any thoughts on how I can address this?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2014 12:54 PM
Thanks for the suggestions to put a business rule on the attachment table. I think that'll work, but it's a bit kludgy. The user has to provide the value, it's not something I can determine from the code. That also means it's a business rule that'll fire for all attachments, not just those for my table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2014 01:24 PM
It fires only the table you mention in Condition and not fire for all tables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2014 01:26 PM
I understand that. What I meant was it clearly fires long enough to check the condition. How far through execution it gets will vary, but it will still fire for every single attachment added to any record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2014 01:30 PM
We are using this type of Business Rule to add an activity log every time user add/delete attachement to/from an incident and we did not notice any performance issues with this rule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2014 01:34 PM
Understood. It's the principle of the matter.
Thanks.