i want to add attachment in the ritm from inbound email action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
This is the code . Can you pls help me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @NeethuB ,
Can you please add one line in your code
GlideSysAttachment.copy('sourceTable',sourceSysID, 'targetTable',targetSysID);
Please mark my answer correct and helpful if this works for you
Thanks and Regards,
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
so my assumption is the above code is working fine and creating RITM but the incoming email has attachment and you want that to be copied to newly created RITM?
what's your use-case?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
yes , can you provide any solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
27m ago
So as per your information the RITM is getting created and the incoming file to email should get copied to RITM
please update code as this
var ritm=new GlideRecord("sc_req_item");
ritm.addQuery('request',rc.sys_id);
ritm.query();
if(ritm.next())
{
ritm.short_description = email.subject.toString();
ritm.contact_type="email";
ritm.update();
new GlideSysAttachment().copy('sys_email', sys_email.sys_id, 'sc_req_item', ritm.sys_id);
}
💡 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 || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
