- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2019 01:45 PM
Hi Everyone,
I'm having an issue getting a notification to trigger off of a scheduled job and registered event. Here's what I'm trying to accomplish and then I'll post the code.
Business need: We are working on a process for new hires and kicking off the Onboarding process via the Service Portal. When the new user is added to the sys_user table, the manager listed on that record receives an email notification asking the manager to go to the Service Portal and request all the services needed to have the new employee hit the ground running on day 1. In the event the manager does not enter the request in the SP, we need an email notification generated each day that the request is not submitted. That's where I'm running into a roadblock.
In my personal dev instance, I'm using a scheduled job that is going to run daily around 05:00 called onboard.remind. Here is the script and I've also attached a screen shot.
var gr = new GlideRecord("sys_user");
gr.addEncodedQuery('u_os=Pending'); //On-boarding Status = Pending
gr.query();
while(gr.next()){
gs.eventQueue('onboard.reminder',gr);
}
For my test case, I have marked one user with the "Pending" onboarding status in his user record. The combination of the scheduled job and the event seem to be pick up the correct user (second screen shot). However, the notification is never triggered to the manager. Any ideas on where I'm going wrong?
Thanks in advance for the help!
Solved! Go to Solution.
- Labels:
-
Notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2019 01:51 PM
Hi,
Please check if the Manager to whom you're sending is having an email id present on the user record, or if you're using Users/ Groups in field on the Notification, then check that the user for whom you're doing it is having a manager updated in his user record or not?
Hope this helps.
Mark helpful or correct based on impact.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2019 01:51 PM
Hi,
Please check if the Manager to whom you're sending is having an email id present on the user record, or if you're using Users/ Groups in field on the Notification, then check that the user for whom you're doing it is having a manager updated in his user record or not?
Hope this helps.
Mark helpful or correct based on impact.
Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2019 08:09 AM
Hello,
We see that you marked this response as Correct. I'd be curious to know if this was the issue. If so, that's very unfortunate to have this be a fundamental issue such as an email missing from the manager record or if the user didn't even have that person as a manager in the first place.
Oh well, but it's definitely recommended to have checked those basic things beforehand.
Take care!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2019 08:20 AM
The email ID was indeed present. However, the notifications weren't enabled for the manager. So this response, although not 100% the correct solution, made the bulb go off in my head. I knew it had to be something simple that I was overlooking.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2019 08:30 AM
Ah, ok. Fair enough. Thanks for clarifying. Glad you got it resolved!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!