Attachment added from RITM to SCTASK and SCTASK to RITM Vice Versa Incase of deletion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 06:57 AM
Hi All,
I have requirement like in the below scenarios:
1) If any attachment is added to RITM I need to copy that attachment to SC task.
In this case i need to update Additional comments in RITM attachment added with file name and in sctask I need to update work notes Attachment "file name" copied from RITMNumber.
2)If any attachment is added to sctask I need to copy that attachment to RITM.
In this case I need to update work notes in sctask like this a Attachment file name added and in RITM comments like Attachment file name copied from sctasknumber.
3)If Any attachment is deleted in RITM and same attachment need to be deleted from sctask.
In this case I need to update comments in RITM Attachment file names is removed and sctask Attachment file name is removed from RITM and same in sctask like this.
4)If Any attachment is deleted in Sctask and same attachment need to be deleted from RITM.
In this case work notes in sc task Needs to update to attachment file name removed and RITM comments Attachment file name has been removed from sctask and RITM.
For all these requirements I have written one business rules as per the below:
Table: sys_attachment
When to run: After - Insert & Delete
In Advance condition Iike below:
current.table_name=="sc_req_item" || current.table_name=="sc_task"
Script is like below:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 08:10 AM
Hi @Sirri
The logic goes on loop, Once the attachment is copied from RITM to SCTask, the BR Triggers again and your else if statement runs again and so on...
Ex- If attachment is added on RITM( then same attachment is copied to CTASK, the BR gets Triggered twice once when attachment is added on RITM and again when it's copied to CTASK, to prevent copying twice, we need to check if it already exists on the destination record before proceeding.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 08:28 AM
As brian suggested, Related list is the good option if you have sync from both RITM to CTASK and vice-versa.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 08:37 AM
Can you provide as per my script . I need to copy like that only I didn't to user Related List concept in this case.
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2025 08:16 AM
You should use attachment.copy. You would then pass it the source and destination table as well as the source and destination sys_id. A better method unless you the end user needs to see attachments that are added from the sc_task would be to use a related list. See this article below.