How to copy attachments from inbound action to incident record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2023 11:11 PM
Hi Team,
When emails are sent to servicenow with attachments ,the attachments are not getting added to respective incident record.And also we need to validate if the email sent is from user present in servicenow.If the user is not present we do not have to copy the attachments.
How we can achieve this.
Thanks in Advance.
Regards,
Karan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2023 11:27 PM
Hello @KARAN24
GlideSysAttachment.copy('sys_email',current.sys_id,'sc_req_item',ritm.sys_id);
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2023 11:50 PM
Hi Samaksh,
Can you please help me with the inbound action,as I would like to create a new inbound for attachments.
Thanks,
Karan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2023 11:59 PM
Hello @KARAN24
var sysAttach = new GlideSysAttachment();
var emailSysId = sys_email.getUniqueValue();
if (emailSysId) {
var sysEmailAttachments = sysAttach.getAttachments("sys_email", emailSysId);
while (sysEmailAttachments.next()) {
sysEmailAttachments.setValue("table_name", current.getTableName());
sysEmailAttachments.setValue("table_sys_id", current.getUniqueValue());
sysEmailAttachments.update();
}
}
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2023 01:50 AM
Hi Samaksh,
I have created an inbound on case table,but it is not working.Can you please check .
Thanks,
Karan