How to include attachments from RITM to approval notification

mania
Tera Contributor

Once we attached some data in the any of the catalog item form in sp how it can be populate in the in email notification in ServiceNow

Thanks in Advance!

1 ACCEPTED SOLUTION

Mehta
Kilo Sage
Kilo Sage

@mania 

 

Create a business rule on sysapproval_approver table, 

Mehta_0-1688465199802.png

 

And in advance section have the below code which will copy the attachment from RITM to Approval Record and you can then use it in notification.

 

GlideSysAttachment.copy('sc_req_item', current.sysapproval , 'sysapproval_approver', current.getValue('sys_id'));

 

Make the mentioned change in the notification  : 

Mehta_2-1688465474927.png

 

 

Please mark my answer as correct, if it resolves your query.

 

View solution in original post

3 REPLIES 3

Mehta
Kilo Sage
Kilo Sage

@mania 

 

Create a business rule on sysapproval_approver table, 

Mehta_0-1688465199802.png

 

And in advance section have the below code which will copy the attachment from RITM to Approval Record and you can then use it in notification.

 

GlideSysAttachment.copy('sc_req_item', current.sysapproval , 'sysapproval_approver', current.getValue('sys_id'));

 

Make the mentioned change in the notification  : 

Mehta_2-1688465474927.png

 

 

Please mark my answer as correct, if it resolves your query.

 

Ben28
Tera Contributor

Hi,

I'm trying to do the same thing, copy attachments (proof of training), to an access request approval email. The attachments is saved on the RITM, so the solution looks perfect. However I tried creating the business rule, but get an error on the condition for "Approval for.Requested Item.Item" = "New Functionality". What should this be? Is New Functionality a placeholder for another variable?

Ben28_0-1695239318263.png

 

guiale
Tera Contributor

In Item condition you should select your catalog item.