Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Image from record producer not showing in email notification

maryamalona
Tera Contributor

I have a record producer field that is an image type, users are supposed to optionally add an image and it will display in an email notification sent after the record producer is submitted.
I'm having trouble with displaying the image in the email notification. Simply typing ${u_image} shows the ID ending in .iix , and I tried this script 

(function runMailScript(current, template, email, email_action, event) {
   var imageName = current.getValue('u_image');
   if (imageName) {
       var imageUrl = gs.getProperty('glide.servlet.uri') +
           'sys_attachment.do?file_name=' + imageName;
       template.print('<img src="' + imageUrl + '">');
   }
})(current, template, email, email_action, event);

and referenced it in "what it will contain" tab in email notification and it shows nothing.
Could anyone provide any insight on this?

0 REPLIES 0