Event is not being triggered from the scheduled job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 02:49 AM
I am trying to fire a event from the scheduled jobs but it is not being fired.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 02:54 AM
Hi, I see the gs.eventQueue() does not follow the correct syntax. pls refer below link and resolve the syntax error.
Suresh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 02:57 AM
Hello,
Based on your use case and the table on which you have created the notification you will need to glide the record and get the record for which you want to trigger the notification and then use the glide object instead of the current.
So the code will be something like below:-
var gr= new GlideRecord('tablename');
gr.addQuery('addyourquery');
gr.query();
if(gr.next());
{
gs.eventQueue("notification.weekly",gr);
}
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 02:57 AM
Hi @Sai Gopal,
Have you checked the Event logs [sysevent] table is there any record created for this event name?
If my response helps you resolve your issue. Kindly mark it as helpful & correct. It will be helpful to future readers! 👍🏻
Thanks,
Sagar Pagar