Copy attachments from Kb artical to Notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 01:44 AM
Hi All,
I am copying the attachments from Kb article to notification email and i writing the email script to do that but i its not working .Please find the attached script below and let me know if anything has to be modified.
script :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 01:55 AM - edited 12-01-2023 01:58 AM
HI @sushma9
var grAttach = new GlideRecord("sys_attachment");
grAttach.addQuery("table_name", "kb_knowledge");
grAttach.addQuery("table_sys_id", "56dba1121b36b998bcae5457604bcbdc")
grAttach.query();
if (grAttach.next()) {
GlideSysAttachment.copy('kb_knowledge', '56dba1121b36b998bcae5457604bcbdc', 'sys_email', current.sys_id);
}
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 02:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 02:45 AM
Hi @sushma9
Can you explain in detail of where you are using the code?
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 02:45 AM
Refer Below link which explains similar requirement
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP