- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2021 08:42 PM
How to copy attachment from sys_attachment table to a field of file attachment type in a custom table.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2021 01:05 AM
Hi,
then the same script can be used to update the attachment field
var att = new GlideRecord('sys_attachment');
att.addQuery('table_sys_id', current.sys_id);
att.query();
if(att.next()){
current.attachment_fieldName = att.sys_id;
current.setWorkflow(false);
current.update();
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2021 09:12 PM
Hi,
Can you please explain more what exactly the requirement??
how you guys store attachment in sys_attachment table like manually on records bla bla....
on which table the file attachment field is ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2021 11:23 PM
Hii @Sarika,
Trying to use Flow Designer.You can Perform Very Easily and Copy the Attachment From Attachment table to custom table . In Flow Designer You Can use Lookup Attachment Records Action to copy the attachment Form the Table And Moved to Custom table.
Please Mark Correct.
Regards,
Vikas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2021 12:58 AM
Hi vikas ,
I have created a flow designer. But the file is not get copied to my file attachment field.
I have used look up record and update record actions in flow designer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2021 01:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2021 01:24 AM
I have used the same . But still the file is not copied to the field.