GlideRecord sent as event parm, not working as expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2023 08:09 AM
Greetings,
I have an event that I am triggering through a BR. Here is a sample below:
gs.eventQueue('sn_scoped_app.event.queued', null, previous, current));
In the handler, I am currently trying to get the GlideRecord and access its methods.
gs.info('Event Handled: '+parm1?.getValue('sys_id'));
I get the following error (PFA error log text)
Constraints:
I cannot pass the sys_id directly to the events as I would lose arguments from the previous gr.
I also cannot create a new GlideRecord and pass it, as I would again lose arguments from the previous gr.
I need both previous and current, which I will eventually use to compare fields and process accordingly.
Any help is appreciated. Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2023 08:33 AM
It looks like the issue is with the getValue() method. You can try parm1?.sys_id instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2023 08:46 AM
Hello @amateurtries ,
where are you trying to access this parameter is it in email script or any other place?