Copy the attachment from catalog item to SCTASK record when catalog item submitted from portal.

MayurChaudhari
Tera Contributor

Use Case - When any request has been submitted from the portal with Attachment added, we need to add that attachment to the one of the SCTASK (RITM should have more than 1 SCTASKs) of that RITM. Also when the user attached the attachment after the request has been submitted, it also needs to be added over the same SCTASK.

 

How can i complete that requirement plz guide me.

6 REPLIES 6

Runjay Patel
Giga Sage

Hi @MayurChaudhari ,

 

you can write async business rule on requested item to add attachments to one of the sc task.

in business rule you can glide record to sys attachment table to get the all attachments and den insert record with reference of sc task record

Hello @Runjay Patel 

Thanks for replying, can u guide me with the script please..

Nick Parsons
Mega Sage

I would suggest avoiding copying attachments down to the children SC Tasks if possible - attachments can be quite large and you'll end up using up a lot of space. Instead, I'd recommend that you create a new relationship record that applies to your sc_task table and queries from your sys_attachment table, and then looks at parent.request_item to get the related attachment records. 

Hello @Nick Parsons 

Thanks for replying, can u guide me how can make relationship record to complete the requirement.