- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2018 11:19 AM
Hi,
I've a record which has an excel file attached to it. I wanted to send this excel file as an attachment over email notification to a list of recipients.
I'm using following script and attached events and notificaiton but notification is sent without attachment.
Pls find screenshots of my notification, script for firing the event which will trigger notification,
var gr= new GlideRecord('u_account_info');
gr.addQuery('sys_id','0e16fb4cdb396b805eb551b0cf961968');
gr.query();
if(gr.next()){
gs.eventQueue('ControlListNotif',current,'31346f00db6c23885eb551b0cf96197a');
gs.info('Event fired');
}
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2018 02:19 PM
Hello Balaji,
This thread will be helpful:
https://community.servicenow.com/community?id=community_question&sys_id=1b417e9bdb475348200f0b55ca961901
Thanks,
Arindam

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2018 01:56 PM
Hi G Balaji,
There is an out of the box Email Script - attach_links that you can add to your email notification that will achieve this for you. System Notification > Email > Notification Email Scripts > attach_links which can be added to your email notification by adding : ${mail_script:attach_links}.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2018 02:19 PM
Hello Balaji,
This thread will be helpful:
https://community.servicenow.com/community?id=community_question&sys_id=1b417e9bdb475348200f0b55ca961901
Thanks,
Arindam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2018 06:45 PM
Balaji,
Are you using this script in a Business Rule ?
does "current" represent the Glide Record object of u_account_info table?
If so, the record representing "current" should have an attachment.
-Aman Gurram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2018 09:41 PM
Hi Balaji,
Please follow the below steps and check
1.Create a new notification on the respective u_account_info custom table.
2.Select the appropriate trigger condition.
3.Set the View as advanced view and goto to What it will contain section/
4.In this section you have Include attachments checkbox.
Please set it to true and save it.Now when ever any notification triggered it will attach the attachment what ever it is there on record.