- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2014 09:46 AM
I have a notification on the Configuration item table that will trigger on a new record. When I create a new record on a child table it doesn't fire the notification. If I change the table on the notification to the child table the notification will fire. any ideas why the child table isn't firing the notification? Are notification not inherited?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2014 10:10 AM
This bites me every time, but it is easy enough to cope with.
I assume you are queuing an event action: if you are passing a child table as current to the notification, then you are correct, the notification will not be triggered (not inherited). So before you fire the event, open the parent record and pass its reference to the event. This also applies the other direction. If the notification is on a child table, it will not fire for events queued on the parent table.
Note: This does mean that the notification will not have access to fields that are only on the child table. If you need them in the notification, you may have to promote them to the cmdb_ci table.
So, for example, instead of:
gs.eventQueue("some.event",current,gs.getUserID(),gs.getUserName()); |
You would use:
var cmdb_ci = new GlideRecord('cmdb_ci');
if (cmdb_ci.get(current.sys_id)) {
gs.eventQueue("some.event",cmdb_ci,gs.getUserID(),gs.getUserName());
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2014 10:10 AM
This bites me every time, but it is easy enough to cope with.
I assume you are queuing an event action: if you are passing a child table as current to the notification, then you are correct, the notification will not be triggered (not inherited). So before you fire the event, open the parent record and pass its reference to the event. This also applies the other direction. If the notification is on a child table, it will not fire for events queued on the parent table.
Note: This does mean that the notification will not have access to fields that are only on the child table. If you need them in the notification, you may have to promote them to the cmdb_ci table.
So, for example, instead of:
gs.eventQueue("some.event",current,gs.getUserID(),gs.getUserName()); |
You would use:
var cmdb_ci = new GlideRecord('cmdb_ci');
if (cmdb_ci.get(current.sys_id)) {
gs.eventQueue("some.event",cmdb_ci,gs.getUserID(),gs.getUserName());
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2014 10:16 AM
I'm not queuing an event I am just using the notification form and checking send on insert and update. Is the only way around this is to use the event queue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2014 11:38 AM
Or, you could make a copy of the notification for the child table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2014 12:23 PM
I ended up making the even queue instead. thanks