gs.eventQueue() with no table

xiaix
Tera Guru

I'm calling this line of code on the server side of a widget, but the notification never triggers:

gs.eventQueue('group.mgmt.desc.change.request', '', '194dd9a7db176b4050fbff9aae9619ea', 'hello world');

Here is my "When to send":

find_real_file.png

 

Here is my "What will it contain":

find_real_file.png

 

And here is my event registry record:

find_real_file.png

 

And yes, this is checked:

find_real_file.png

 

They sys_id I'm passing (194dd9a7db176b4050fbff9aae9619ea) is a group sys_id.

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Where are you triggering this gs.eventQueue() from? Can you share that bit of code as well?

The second parameter is required. You can use current, any GlideRecord record, and I believe I've used null on occasion.

View solution in original post

6 REPLIES 6

Chuck Tomasi
Tera Patron

Where are you triggering this gs.eventQueue() from? Can you share that bit of code as well?

The second parameter is required. You can use current, any GlideRecord record, and I believe I've used null on occasion.

Bingo.  Adding "null" worked great.

 

gs.eventQueue('group.mgmt.desc.change.request', null, '194dd9a7db176b4050fbff9aae9619ea', 'hello world');

 

For what it's worth, I'd advise against using sys_ids hard coded in script like this. Find a 'maintainable' alternative. In 12 months you (or someone doing your job) won't have a clue what that sys_id is for. Try using a display value, or a property to get that sys_id, or a display value in a property to get the sys_id. It's a couple lines more of code, but it makes maintenance a LOT easier in the future.

I'm not.  I share your concern.  Here's the "real" code:

First:
find_real_file.png

 

Then:
find_real_file.png