Attachments are not copied

Vinya Jakkula
Tera Contributor

Hi team,

I have added a attachment on request in service operations workspace, but it is not attaching to ritm and task.

Where the configuration exists.

Please help me

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

You need to build the logic to copy the attachments from REQ to RITM/Task.

 

https://www.servicenow.com/community/developer-forum/copy-attachments-from-request-to-ritm/m-p/20612...

 

https://www.servicenow.com/community/itsm-forum/copying-the-attachments-from-req-to-ritm-to-sc-task/...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@Vinya Jakkula 

if attachment is on REQ then you need to add that when RITM or SC Task is created

You can use this business rule script in after insert BR on each sc_req_item and sc_task table

BR on RITM table

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	new GlideSysAttachment().copy('sc_request', current.request, 'sc_req_item', current.sys_id);

})(current, previous);

BR on SC Task

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	new GlideSysAttachment().copy('sc_request', current.request_item.request, 'sc_task', current.sys_id);

})(current, previous);

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar but it is not getting displayed on tool bar where attachment exists.

@Vinya Jakkula 

share your scripts along with screenshots

If attachment is present on sc_request then the above 2 BR scripts shared by me will work fine.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader