Events are getting fired but Notifications are not getting triggered through Schedule Job.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 08:38 AM - edited 07-30-2023 08:39 AM
I am trying to trigger a notification when an Event is fired through Schedule Job.
Schedule Job - I selected "Automatically run a script of your choosing" as attached.
Script -
var ownerInactive = new GlideRecord('sn_grc_profile');
ownerInactive.addEncodedQuery('owned_by.active=false');
ownerInactive.query();
while(ownerInactive.next()){
gs.eventQueue("sn_grc.entity.owned.by.inactive", ownerInactive, "", "");
}
Event - sn_grc.entity.owned.by.inactive on Table - sn_grc_profile
Notification - Table - sn_grc_profile
When to send - Event is fired
Who will receive - A group
I don't know why notification is not getting triggered with the above configurations. Can someone pls help me on this?
I am stuck on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 09:51 AM
Hi @aagman4,
Have you checked the System policy ---> Event logs [sysevent] table and record for fired event. Is state is processed or errors?
If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 11:43 PM - edited 07-30-2023 11:46 PM
Thanks Sagar for the quick response. I checked today, I don't know how but its working fine now and now I have a new question - What condition I can give on schedule Job Script - Line - ownerInactive.addEncodedQuery('owned_by.active=false'); so that Notification will only be triggered for the newly inactivated owners. Otherwise, it will sent notification for all the entities whose owners are inactive. Please help me on this case.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 09:51 AM
@aagman4 A couple of things to check on your notification.
1. Check if the event name is configured correctly on your notification.
2. Check if there are any members added to the group which is selected in Who will receive the notification
3. Check if the users which are members of the group have active checkbox on their sys_user record set to checked.
4. Check if the users which are part of the group have their email ids entered on their user record.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 11:44 PM - edited 07-30-2023 11:45 PM
Thanks Sandeep for the quick response. I checked today, I don't know how but its working fine now and now I have a new question - What condition I can give on schedule Job Script - Line - ownerInactive.addEncodedQuery('owned_by.active=false'); so that Notification will only be triggered for the newly inactivated owner. Otherwise, it will sent notification for all the entities whose owners are inactive. Please help me on this case.