gs.eventqueue not taking glide record object
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 03:10 AM
I am trying to send email notification. I have created an event. I am calling my event through scheduled job. I am trying to pass the gliderecord object, but the event log is showing as error. This is my code:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 03:16 AM
Can you share the error which you are getting?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 03:25 AM
Hi @Nayana N ,
I trust you are doing great.
Please find below comments .
- The variable declaration for target is missing a keyword (var or let or const) before it.
- In the gs.eventQueue() function, you are passing target as the second argument, which should be a string value representing the name of the event to be triggered.
- You are passing an empty string as the fourth argument in gs.eventQueue(), which should be a valid JSON object that contains any additional data to be passed along with the event.
var target = new GlideRecord('u_public_cloud_extract_vw');
target.addEncodedQuery('vul_u_account_l3_ownerLIKESharon Bottome^vul_u_vulnerability_severity_status=Critical^vul_u_vpr_score>=9.5^vul_u_owner_email=shantini.vandichalil@hp.com');
target.query();
while (target.next()) {
gs.eventQueue("vul.email.notification.eis", null, target.vul_u_owner_email, {});
}
Please mark the answer correct if its of any help.
Regards,
Amit Gujarathi
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi