Getting attachment in Email rather than link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2010 10:11 AM
Hi ,
I have a requirement to get all the attachment of an incident ticket in the mail notification(not as a link). I was able to send the links of attachments through notification.
Could any one please tell how can I accomplish it.
Thanks in advance.
Habin
- Labels:
-
Analytics and Reports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2016 09:29 AM
Where are you getting the 'u_sent' field from. It doesn't exist in sys_attachment dictionary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2010 03:15 PM
I would like to send the attachment of the parent request_item for the task in the email. I can't seem to get it to work. Any suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2012 07:32 AM
Hello,
I have tried the code and works great for attaching to the email, but does not filter and send only the ones not sent.
I have added the send column into the attachment table, and this value gets updated successfully.
Curious if we want to send only the ones that have not been sent, why the copy method is not within the while loop and use the sys_id from the attachment table.
I am a novice ServiceNow developer, so reaching out for advise.
Here is my code:
var myInc = current.instance;
var gr = new GlideRecord('sys_attachment');
gr.addQuery('table_sys_id',myInc);
gr.addQuery('u_sent',false); //look for attachments that haven't been sent
gr.query();
while (gr.next()) {
gr.u_sent = "true"; //mark the attachment as already sent so we don't send again
gr.update();
var table = gr.table_name;
gs.print ('Looking for attachment');
// where gr.sys_id is the sys_id on the attachment table and table = u_client_impact_record
Packages.com.glide.ui.SysAttachment.copy (table, gr.sys_id, 'sys_email', current.sys_id);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2012 08:08 AM
It won't help with the issue of sending only the unsent attachments, but wanted to let you know that there is now an "Include attachments:" field option on email notifications. This will automatically include file attachments for all attachments on the source record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2012 02:29 PM
Hello John, I am trying to send an email notification with an attachment. Is not working for me. I have checked the Include Attachment box and have attached the attachment to the notification. Maybe I do not understand the attachments on the source record. Is that the notification or requested Item? I am using a catalog request. Have included an attachment to help explain. Thanks Jim