gs.eventQueue not kicking off Notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 10:13 AM
My scheduled Job is kicking this off every 30 minutes. I see the process logs in the event logs (no errors) but my notification is not kicking off. It's getting quite frustrating:
var br = new GlideRecord('x_g_dh5_brs_bed_space_request');
br.addEncodedQuery('status=originating aor review');
br.query();
while (br.next()) {
if (br.sys_created_on == br.sys_updated_on) {
gs.eventQueue('x_g_dh5_brs.brs.aor.notification', bedRequests, bedRequests.getUniqueValue(), 'aeadd02f1bc91850f0d743f1f54bcbe3'); / //parm 2 is the sys_user sys_id of my account
}
}
Here is my notification (I made it super simple)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 10:18 AM
@kemmy1 Please update the script as follows and see if it works.
var br = new GlideRecord('x_g_dh5_brs_bed_space_request');
br.addEncodedQuery('status=originating aor review');
br.query();
while (br.next()) {
if (br.sys_created_on == br.sys_updated_on) {
gs.eventQueue('x_g_dh5_brs.brs.aor.notification', br, br.getUniqueValue(), 'aeadd02f1bc91850f0d743f1f54bcbe3'); / //parm 2 is the sys_user sys_id of my account
}
}
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 12:41 PM
That was a typo on my part. The Event log gets created with the correct information
But still no notifications kick off.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 10:46 AM
Hi @kemmy1 - In addition to resolving the naming inconsistency as @Sandeep Rajput has suggested...assuming you're comparing sys_created_on to sys_updated_on to determine if the record is new, you can also check if sys_mod_count is 0.
Seeing that you're running this job every 30 minutes, are you updating the record to ensure a notification isn't triggered for the same record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2024 12:43 PM - edited 08-26-2024 12:43 PM
My events are kicking off (see above reply to Sandeep) and each event has a different sys_id of the record I want to create a notification for. It's such a head scratcher.