Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

gs.eventQueue not kicking off Notification

kemmy1
Tera Guru

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)

kemmy1_0-1724692390572.pngkemmy1_1-1724692408567.png

 

kemmy1_2-1724692413532.png

 

8 REPLIES 8

Is there anything in the email logs? Can you show the rest of the columns in the event logs, or can you screenshot one of those event log records?

I actually made the eventQueue easier by just adding pairing it down:

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);
}
}

 

Here is the one of the event logs, there's nothing that shows up on the email logs.

 

kemmy1_0-1724704540925.png

 

This is all in the same scope too, the Event, the notification, the query I created.

Do you have the Email Logs related list on the Notification itself? Also, have you ruled out the obvious?

 

  • The notification is active
  • LAKemes has a valid email address
    • You can add an additional user to the Users (recipients) list for testing. If that works it could be that LAKemes's email address is blocked (check sys_blocked_email_address)

 

I might remove the email template and just put like "Testing..." in the Message HTML to rule out something funky going on there.