- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2022 05:00 AM
Hello!
I have a scheduled job that triggers an event, which then triggers a notification. This is my scheduled job:
var sysid = gr.getValue('current.variables.contract_support_group');
var gr = new GlideRecord("sc_task");
gr.addEncodedQuery('numberSTARTSWITHSCTASK0000001');
gr.query();
while (gr.next()) {
gs.eventQueue('event_name', current, 'current.variables.group_reference_variable','current.variables.listcollect_usertable');
}
The Notification (sysevent_email_action) also has the Groups field populated.
When I execute the scheduled job, an email is sent but only to the group in the Groups fields but not to the parameters (parm1, parm2) in the gs.eventQueue.
Please help on what is the cause why this is not working.
Thank you.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2022 05:11 AM
Is this the whole code?
in gs.eventQueue, you need to remove the quotes form 3rd and 4th parameter, essentially it is just passing string instead of variable containing values?
One more thing, how do you have access to current in scheduled job?
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2022 05:11 AM
Is this the whole code?
in gs.eventQueue, you need to remove the quotes form 3rd and 4th parameter, essentially it is just passing string instead of variable containing values?
One more thing, how do you have access to current in scheduled job?
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2022 11:39 AM
Feel free to mark correct if it resolved your issue 🙂
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2022 04:24 AM
Your questions guided me to the right path in resolving my issue.
I used the variable name used for the GlideRecord and removed the quotes from the 3rd and 4th parameters.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2022 05:14 AM