Notifications for Changes being triggered from New Record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2023 02:53 PM
Two notifications were created. One for when a new record is created in cmdb_ci_servers, and another when a record is changed in the same table.
When a server record is changed, the Server Change notification is sent out. When a new record is created (and this is where the issue is), the Server New notification is sent AND the Server Change notification is sent. I have a condition in place that the Server Change notification should only be getting triggered if the Name or Install Status changes.
I've triple checked that the correct checkboxes are checked for when it's Inserted vs Updated, and attempted to build these notifications within Flow Designer and using System Notifications. In both cases, when a new server is manually added (or discovered), both notifications are triggered. I've tried setting the conditional formatting to not trigger if the name or install status changes from null.
I strongly considered the Business Rules, and ran the debugger to watch which business rules were firing off (in our sandbox, no real worries), and toggled every business rule off that ran and was potentially tied to this, but the Server Change continues to trigger from new servers.
Does anyone have any thoughts as to why this is happening?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2023 10:44 PM
That sounds weird. If you've selected "Send when" to "Record inserted or updated" and selected only one of the options, then it should not send it at all on the other scenario.
For both messages to get sent it would mean that someone has done some kind of configuration to do an update after the insert.
Examples would be a After insert BR which does a current.update(). It might even be something more complex that ends up querying servers and does an update on each one (doubt since you only get notification for the one you updated?). There could also be a display BR or a client script that checking something and ends up doing an update.
For debugging you might want to make the server table auditable so that you can see the update history. Fill some information, insert the server and then check if there are any additional changes in the history that you didn't do. That might help with finding the root cause.