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-26-2017 12:29 AM
var usrs = [];
var obj = '';
var gr= new GlideRecord('sys_user');
if(gr.get('name', 'Abel Tuter')){
obj = gr.sys_id.toString();
}
if (current.notifications=='true')
{
usrs.push(current.delegate);
}
if (current.u_cc_jsnead == 'true')
{
usrs.push(obj);
}
gs.eventQueue('manage.proxy.notify', current, usrs, "" );
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:37 AM
Hi,
Still not working. Where can i be going wrong??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2017 12:28 AM
Are you mean User id ?
Use : gs.getUserName()
Example :
user.push(current.u_user1. gs.getUserName());
Thanks,
Syed