- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2025 03:06 AM - edited 09-14-2025 03:08 AM
Hi Team,
I have created an onbound action in sc_request table and itis creating the RITM catalog item and I have to copy the attachments records which are given in email to RITm but it is not happening. Can someone help me with this if there is anything wrong here in script or is there any way that I can use to copy the attachments which are coming through inbound actions to RITm record
here is the script that I have written everything is working s expected but the ttachments are not copying to RITm from emails.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2025 03:00 AM
update your line with this and test once
new GlideSysAttachment().copy('sys_email', sys_email.sys_id, 'sc_req_item', ritmGR.sys_id);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2025 10:07 PM
Hello,
Your current script correctly uses GlideSysAttachment.copy() to move attachments from the inbound email to the newly created RITM. The code GlideSysAttachment.copy('sys_email', email.sys_id, 'sc_req_item', ritmGR.sys_id); is the proper method for this task. Since you've confirmed everything else works, the issue might be a slight timing problem where the RITM record is not fully committed to the database when the attachment copy script runs. Placing your attachment copy logic at the very end of the inbound action's script is the correct approach to ensure the RITM record is fully available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2025 03:00 AM
update your line with this and test once
new GlideSysAttachment().copy('sys_email', sys_email.sys_id, 'sc_req_item', ritmGR.sys_id);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2025 08:42 AM
Thanks Ankur, It worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2025 03:14 AM - edited 09-15-2025 03:15 AM
Hi @prasannasun ,
Attachments in inbound emails are stored on the sys_email record and need to be explicitly copied to the RITM. Use the supported GlideSysAttachment.copy() API as shown below:
{
GlideSysAttachment.copy('sys_email', email.sys_id, 'sc_req_item', ritmGR.sys_id);
}
If attachments aren’t copying, check that:
The inbound action runs after attachments are saved.
Attachments actually exist on sys_email for the processed email.
Useful references:
Thanks & Regards,
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
