How to copy attachment from sys_email to case record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2025 08:15 AM
Hi,
I am trying the copy attachment from sys_email to case record so i havee used below code but not getting mapped.
Can anyone please let us know where i missed?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2025 08:51 AM
Is the email coming of type Reply and it has attachment and you want to add that file to target record?
If yes then do this in inbound action of type Reply
GlideSysAttachment.copy('sys_email', sys_email.sys_id, 'sn_customerservice_case', current.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
07-28-2025 09:00 AM
Thanks for the responding!
Even i used same line of code in forward inbound action also not getting mapped.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2025 09:21 AM
it should work fine, did you add logs and see?
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
07-28-2025 09:49 AM