Array of users in Business rule for Event of email notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2017 11:44 PM
I want to add some particular user like 'Abel tutor' and also some users in a particular user field in an array and send email notifications to those users. How can I implement it?
For example: If the 'u_user1' reference field contains 'Beth Auther', and 'u_user2' reference field contains 'Arun Sharma', I want to send email notification to all 3 users (Abel tutor, Beth Auther, Arun sharma) through event based on the conditions of other fields.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2017 11:50 PM
Hi,
You can push all entries to your array and send it as the 3rd parameter in event call.
var user = [];
user.push(current.u_user1);
user.push(current.u_user2);
user.push(current.u_user3);
gs.evenQueue('event_name', current, user, '');
Make sure you have marked event parm 1 as recipient in your notification
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 12:04 AM
Hi,
Thanks. And how to add 'Abel Tutor' which is fixed. How to get its Id?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 12:23 AM
Hi,
I tried it but still not able to get email notification. What should I mention in event registry??
My BR:
var usrs = [];
var usrobj = gs.getUser();
usrobj = usrobj.getUserByID('john.adams');
if (current.notifications=='true')
{
usrs.push(current.delegate);
}
if (current.u_cc_jsnead == 'true')
{
usrs.push(usrobj);
}
gs.eventQueue('manage.proxy.notify', current, usrs, "" );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 12:25 AM
var user = [];
var gr= new GlideRecord('sys_user');
if(gr.get('name', 'Abel Tuter')){
user.push(gr.sys_id.toString());
}
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response