Copy attachments from Kb artical to Notification

sushma9
Tera Contributor

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 :

 var grAttach = new GlideRecord("sys_attachments");
    grAttach.addQuery("table_name", "kb_knowledge");
    grAttach.addQuery("sys_id", "56dba1121b36b998bcae5457604bcbdc")
    grAttach.query();
    if (grAttach.next()) {
        GlideSysAttachment.copy('kb_knowledge', '56dba1121b36b998bcae5457604bcbdc', 'sys_email', current.sys_id);
    }
5 REPLIES 5

Gillerla Rajesh
Tera Contributor

use glide system attachment api 

Example:

IMG_20231201_161658.jpg