How to send notification to users in a variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2015 05:37 AM
Hi All,
Can anyone please let me know how to send the notification to the users in variable?
Let's share my scenario
I have one variable 'x' on a variable form ,x contains 10 user id's. Now I need to send a notification to the 10 members who are there in 'x'.
Can anyone please suggest.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2016 09:09 PM
use this in your email notification message
<mail_script>
var gr= new GlideRecord('sys_user');
gr.get(current.variables.<your variable_name>);
email.setReplyTo(gr.email.toString());
</mail_script>

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2016 09:58 PM
You can shorten this code by dot walking.
<mail_script>
email.setReplyTo(current.variables.<your variable_name>.email.toString());
</mail_script>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2016 02:03 PM
I can't get the notification to trigger. I complete the request form but no email.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2016 08:24 PM
Hi,
Have you tried. current.variables.<variable_name>.email.
Just loop all the users and get the email.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2016 08:57 PM
The email is not on the on the request form.
In summary: I have a two reference variables looking up names in the sys_user table. I need these users be included in the outgoing notification email triggered when the service catalog request is submitted.
Any ideas?