Scheduled job to queue event
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2016 03:30 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2016 04:35 PM
Hello Josh,
The syntax of eventqueue is gs.eventQueue("incident.commented", current, gs.getUserID(), gs.getUserName());
Please make sure you are passing all the parameters. More info can be found here.
http://wiki.servicenow.com/index.php?title=Events_and_Email_Notification#gsc.tab=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2016 04:54 PM
Hi Pradeep,
I just want to this notification to send every 6 months to all authors of published articles. It looks like the methods in the parameters you listed only pull current users. Is there a way I can have this email notification send to all authors of published articles?
Thanks,
Josh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2016 07:49 PM
Hi Josh,
You may try the following the steps to troubleshoot:
1. run the script and trigger similar script in some business rule
2. make sure the event of "knowledge.review.recycle" is created in /sysevent_list.do
this will isolate if the script is functional to the user
3. if yes, monitor if the state of this event is marked as "Processed"
this will isolate if the event has been processed by event processor or not
4. if yes, monitor the record of email is created in Outbox /sys_email_list.do?sysparm_query=mailbox%3Doutbox%5Esys_created_onONToday%40javascript%3Ags.daysAgoStart(0)%40javascript%3Ags.daysAgoEnd(0)
this will isolate if the email notification is defined correctly
Regards,
Levin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2016 09:21 PM
Hi Josh,
I think you need to populate all the parameters of gs.eventqueue.
If you have already configured the recipients in the email notification.
You can try this:
var gr = new GlideRecord('sc_req_item');
gr.setLimit(1);
gr.query();
if(gr.next()){
gs.eventQueue("event.name", gr , gr.number , gr.cat_item);
}