(function runMailScript(current, template, email, email_action, event) { var user = new GlideRecord('sys_user'); user.addEncodedQuery('user_name=' + current.sys_created_by); user.query(); while (user.next()){ email.addAddress("to", user.email,user.name); template.print(user.name); email_action.recipient_users += user.sys_id+","; } })(current, template, email, email_action, event);
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter