is there a way to include attachments on Approval Email Notifications without having to copy them from the "approval_for" reference record ?

Makosko
Tera Expert

For some strange reason, I seem unable to have SN copy attachments from the approval_for reference record to an actual approval request. In my email notification, I have the "Include Attachments" field checked, still no attachments coming through. Is there something else I am forgetting to check ??

Any help with this would be very much appreciated.

32 REPLIES 32

Take a screenshot of the Template for the email and an example email sent if you could please. It also might be that you are modifying an email template that is not used for that approval. I have attached my instances screenshot to see if that will help you.



ScreenShot186.jpg


ScreenShot188.jpg


approval 1.PNG


approval 2.PNG



email.PNG


I think i know what is going on now. Looks like you turned on approvals on the Incident Table. Most OTB only use approvals on Requested Item and Change.



In the business rule you probably need to change sc_req_item to incident in the 2 locations below. I have not tried this but seems to be the problem if you are using our Requested Item Business Rule.



Name = Whatever you would like.


Table = Approval


When = Before


Order = 100


Script =


var gr = new GlideRecord('sc_req_item');


gr.addQuery('sys_id', current.sysapproval);


gr.query();


while(gr.next()) {


Packages.com.glide.ui.SysAttachment.copy("sc_req_item", gr.sys_id, "sysapproval_approver", current.sys_id);


}


My business rule is set up as such: (this works for displaying the attachment in the Summary of Item being approved section)



function onBefore(current, previous) {


  if(typeof GlideSysAttachment !== "undefined") {


      GlideSysAttachment.copy('incident', 'current.sysapproval.sys_id.toString()', current.getTableName(),current.getUniqueValue());


}


else {


      Packages.com.glide.ui.SysAttachment.copy('incident', 'current.sysapproval.sys_id.toString()', current.getTableName(), current.getUniqueValue());


}


}


I dont have an IF statement in mine. Maybe that is tripping you up.