Issue Copying All Attachments from Task to RITM in Flow Designer

monica190
Tera Expert

Hi Team,

I’m facing an issue where I am unable to copy all attachments from a task to the corresponding RITM using Flow Designer.

I have two inputs:

RITM (referencing the sc_req_item table)
SC_Task (referencing the sc_task table)
My approach:

I look up records in the sys_attachment table using a filter to find attachments related to the sc_task.
I use a For Each loop to iterate through the retrieved attachments.
Within the loop, I call the Copy Attachment action.
Issue:
Only one attachment is getting copied instead of all.

monica190_0-1740552807104.png

 

monica190_1-1740552829359.png

 

1 ACCEPTED SOLUTION

@monica190 

I just tested and it worked fine for me

I am passing task sysId and RITM GlideRecord object as input to subflow

Check this

flow subflow copy attachment.gif

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

View solution in original post

9 REPLIES 9

Hi @Ankur Bawiskar 

As I mentioned in my question, the issue is that only one attachment is being copied instead of all.

@monica190 

in your flow execution it shows Run time value for Source Attachment record as empty

If it's working for 1 record then it should work for 2nd as well.

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 Thanks for your response, but that's exactly the issue, I am unable to reproduce it.

@monica190 

Did you test it with different SC Task and RITMs?

Subflow is running as System user?

what's the input type for ritm? Is it reference to RITM table?

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

@monica190 

I just tested and it worked fine for me

I am passing task sysId and RITM GlideRecord object as input to subflow

Check this

flow subflow copy attachment.gif

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