Events are logging as error

Naga Ravindra R
Kilo Sage

Hi Developers,

 

I'm triggering an event from Flow action, but I'm getting error in event logs like below:

NagaRavindraR_0-1723051968800.png

 

I'm passing sys_id into script include from Flow Action.
This is my event queue script:
Here I'm passing unique group members in "unique_members_list[i]" and "adr_sys_id" is sys_id of the record.

 

 

gs.eventQueue('x_diocg_service_al.adts_created_notify', adr_sys_id, unique_members_list[i], '');

 

Not sure why sys_id is passing in table field and not in parm1?

 

Any suggestions? Thank you.

3 REPLIES 3

Allen Andreas
Administrator
Administrator

Hello,

The format for triggering an event via script such as eventQueue is: 

gs.eventQueue('name_of_event', glideRecord, parm1, parm2, 'custom_event_queue_if_applicable');

So you'd want to ensure that "adr_sys_id" is an actual GlideRecord object.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hello @Naga Ravindra R 

Please let me know if my reply above helped resolve your issue. It seems that basically the exact same thing I've already mentioned above, in my initial reply, is said below as well.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

SN_Learn
Kilo Patron
Kilo Patron

Hi @Naga Ravindra R ,

 

The eventQueue methods takes 4 parameter and 5 as optional:

 

gs.eventQueue('x_60157_employee_spe.employeeOccasion',current,current.number,gs.getUserName());

Reference: https://developer.servicenow.com/dev.do#!/learn/courses/washingtondc/app_store_learnv2_automatingapp...

 

You are missing the GlideRecord object here due which table is getting updated with the 'adr_sys_id'

gs.eventQueue('x_diocg_service_al.adts_created_notify', <GlideRecordGoesHere>,adr_sys_id, unique_members_list[i], '');

 

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.