
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 03:03 PM
I have the following in my email script :
template.print(event.parm1.getDisplayValue());
It does display a bunch of number which is the sys id. How do I get the value of the sys id of the user?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 03:17 PM
Thanks for the update Claudia, You can GlideRecord the target table to get the displayValue i.e
var gr = new GlideRecord('sys_user');
gr.addQuery('sys_id',event.parm1);
gr.query();
if(gr.next())
{
template.print(gr.getDisplayValue());
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 03:08 PM
Hello Claudia,
Can you please paste gs.eventQueue script here.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 03:13 PM
gs.eventQueue('catalog.opening.dns.notification', current, user, au.unique(recipients[user]).join(', '));
var au = new ArrayUtil();
//gs.info('Object' + JSON.stringify(recipients));
for (var user in recipients) {
gs.eventQueue('catalog.opening.dns.notification', current, user, au.unique(recipients[user]).join(', '));
// gs.print (user + '='+ recipients[key]);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 03:17 PM
Thanks for the update Claudia, You can GlideRecord the target table to get the displayValue i.e
var gr = new GlideRecord('sys_user');
gr.addQuery('sys_id',event.parm1);
gr.query();
if(gr.next())
{
template.print(gr.getDisplayValue());
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2017 03:22 PM
Why do I need to query the table? why does "template.print(event.parm1.getDisplayValue()); ' didn't work?
var gr = new GlideRecord('sys_user');
gr.addQuery('sys_id',event.parm1.getDisplayValue());
gr.query();
if(gr.next())
{
template.print(gr.getDisplayValue());
}
In line 02 : sys_id meand you are filtering sys_ids... how about event.parm1.???
Could you explain me your script line by line please?