Need to send notification to user selected on variable RITM

Mike D1
Giga Guru

Hi

I have a catalog item with 4 sys_user reference fields to select their delegate for 4 different software programs while they are on leave.

I need to send a notification to the users listed in these fields to let them know that so and so has made them a delegate in the respective software programs. 

I have registered the event, created the notification and business rule, however it doesn't seem to be sending to the user in my selected sys_user reference field. 

Also is there a way to send to all 4 users in one business rule or can I only use two event parameters to send i.e. I will need to create two separate business rules containing two recipients each.

 

Many thanks

find_real_file.png

1 ACCEPTED SOLUTION

Shakeel Shaik
Giga Sage
Giga Sage

Hi @Mike D

 

 

syntax for eventQueue() method.

gs.eventQueue('<eventRegisteryName>',current ,'parm1','parm2');

Example:
gs.eventQueue('send.delegation.approval.notific', current, current.variables.myDelegate, '');
and select parm1 in Notification. Here I selected parm1 contains recipient because i'm passing the parm1 recipient from EventQueue
find_real_file.png

Please check and Let us know.

 

Thanks:)

Thanks,
Shakeel Shaik 🙂

View solution in original post

4 REPLIES 4

Bharath40
Giga Guru

Business rule is not required, you can call an event from the workflow run script activity. Yes you can send 4 users in one param using an array.

 

var userList = [];

userList.push(four user sysid's);

gs.eventQueue("EVENT-NAME", current, userList.toString());

Hi Bharath

I have done this as below however it still isn't sending the notification. 

Is there something particular about a reference field that needs to be done? "delegateSnow" is a reference field to sys_user table

Also if I want to use an array for the other three reference fields how do I get the sysIDs in to the array?

find_real_file.png

 

Shakeel Shaik
Giga Sage
Giga Sage

Hi @Mike D

 

 

syntax for eventQueue() method.

gs.eventQueue('<eventRegisteryName>',current ,'parm1','parm2');

Example:
gs.eventQueue('send.delegation.approval.notific', current, current.variables.myDelegate, '');
and select parm1 in Notification. Here I selected parm1 contains recipient because i'm passing the parm1 recipient from EventQueue
find_real_file.png

Please check and Let us know.

 

Thanks:)

Thanks,
Shakeel Shaik 🙂

Hi Smudge

This is what I have done, however it doesn't seem to be pulling the user from the reference field? 

Is there something particular about a reference field that needs to be done?

I have also tried via workflow and it still does not send

find_real_file.png