- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2018 08:09 AM
Hi all,
I need to add an attachment to one catalog item at service portal so the end user can download it. I have the next script to do it.
It takes a record from sys_attachment table (href="/sys_attachment.do?sys_id=57b0583edbe60700c6efdd3b5e961977"), but I need to modify that file and I go to the table and I can´t modify it or create a new attachment.
I read a lot of information this week, but I didn't find something to help me.
If you know where or how I can create a new attachment record or modify the existing, please let me know.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2018 08:18 AM
var sourceSysID = '1db6b56e6fa58f4882d1cf164b3ee4bf';
var targetSysID = current.sys_id;
var copyAtt = new GlideSysAttachment();
copyAtt.copy('kb_knowledge', sourceSysID, 'sc_req_item', targetSysID);
Here is the script I used in workflow to attach files in Service Catalog Request Items. Modify this script for your tables and see if it works. This is not the ideal way but a workaround I found to do it after trying so many other ways.
I have the attachment in Knowledge base and use it to attach for request items of specific catalog item. Let me know if you have any questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2018 08:18 AM
var sourceSysID = '1db6b56e6fa58f4882d1cf164b3ee4bf';
var targetSysID = current.sys_id;
var copyAtt = new GlideSysAttachment();
copyAtt.copy('kb_knowledge', sourceSysID, 'sc_req_item', targetSysID);
Here is the script I used in workflow to attach files in Service Catalog Request Items. Modify this script for your tables and see if it works. This is not the ideal way but a workaround I found to do it after trying so many other ways.
I have the attachment in Knowledge base and use it to attach for request items of specific catalog item. Let me know if you have any questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2018 08:34 AM
Thank for your attention, let me try this method.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2018 01:37 PM
Thanks I did it. I upload the attachment in Knowledge base and then use it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2018 08:19 AM
Yes, if you go to the list of attachments, and click it, it will download it. There is no OOB method for editing attachments. They really can only be downloaded and uploaded / deleted.
You can do it through script, but not manually like that.