How to copy the attachments from inbound email to the request and its related records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello everyone,
I have a little bit complicated situation i am currently adding the inbound email as an worknote or comments to the Incident, Change, Request(RITM and SCTASK as well)
But while updating the request I am having a condition to update the related records as well so when the sctask is updated it should update RITM and request and when RITM is updated it should update Request and Sctask and so on
Everything is good until the email comes in with attachments and inline images
so when the email is received by RITM on the RITM everything is fine but for the SCTASK and Request if it already contains any images it copies every previous image and attachment together with image and attachments received from the new email how do i solve this issue below is my code to copy the attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
copy method copies all files again and not specific one
use this link where I shared solution to copy specific file
Is there any way to copy single attachment from multiple attachments ??
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Ankur,
My requirement is if RITM is updated with email then copy the data to SCtask as well not just single attachment but when RITM is updated its just once and SCTASk Copies all other and vice versa and unfortunately this does not solve my problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
please share complete business requirement with screenshots
what's happening currently?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi ankur,
so my requirement is whenever system receives an email with an ticket number we need to update thoes email as an journal entry to the ticket so if its a custsomer email as an additional comment and if its an internal then as an worknote and generate an pdf for the email and attach it aswell to the ticket but for incident and change everything is okay.
But for Request we need to update the related records as well so if Request receives an email then i need to update RITM and SCTASK and if RITM receives the update SCTASK and request and same for SCTASK
But here the issue is the email some times includes attachments, screenshot, inline image
so when RITM recives an email RITM is updated normally only the new attachments are copied as an attachment but for SCTASK and Request all the attachments are getting copied that to multiple times
Below is the example where i sent an email to Request just an generated pdf
similarly at the same time multiple similar images got updated for RITM
just with few updates you can see the count for ritm attachments and same happening with sctask
Hope its clear to you its a bit complex
regards,
Arundhati