Events: firing an event from a related table and passing multiple sys_ids in 1 parm to a notification.

josh_tessaro
Giga Expert

I am trying to fire an event from a workflow that is running for Incident SLAs. This workflow is running on the task_sla table.

I need to be able to fire an event for the task_sla.task (always incident in this case) that will trigger a notification on the incident table. parm1 should include the list of recipients.

I am having two problems:

1. how do I fire an event on a related table?

Instead of: gs.eventQueue(<eventName>,current,<parm1>,<parm2>);

I need to be able to send: gs.eventQueue(<eventname>,current.task,<parm1>,<parm2>);

When I do this now and look at the EventLog it is not registering the correct table (its showing the sys_id of the current.task record) and is not registering the value of either parm.

2. How can I pass multiple recipients to a notification from an event? I have tried a comma separated list of sys_ids with no luck but that could be because of the issue in item 1 above where the parameters are not being registered presumably because of the bad table identifier.

Thanks!

5 REPLIES 5

I figured it out.



I needed to use this instead as for some reason the .get() was not really working.


var gr = current.task.getRefRecord();