GlideRecord sent as event parm, not working as expected

amateurtries
Kilo Contributor

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

2 REPLIES 2

Laszlo Balla
Mega Sage
Mega Sage

It looks like the issue is with the getValue() method. You can try parm1?.sys_id instead.

Mohith Devatte
Tera Sage
Tera Sage

Hello @amateurtries , 

where are you trying to access this parameter  is it in email script or any other place?