- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2021 02:46 PM
Hi all,
We are currently in a beta Agent Workspace go-live with a small amount of users. One thing we've relied on is the "Related Attachments" related list on catalog task records. This related list would show attachments from related records (e.g. Requests), and when you clicked on an attachment in the related list it would download it.
I find that because of the way Agent Workspace opens related records in a new tab, it doesn't download the attachment but rather opens the actual attachment record in a new tab.
I am wondering if there is a way to configure the related attachment to download in workspace rather than open the attachment record.
For reference, this is the form I used to create the Related Attachments Related List - https://community.servicenow.com/community?id=community_blog&sys_id=928c2ae1dbd0dbc01dcaf3231f961927
Thanks in advance.
Solved! Go to Solution.
- Labels:
-
Multiple Versions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2021 10:29 AM
I ended up using an onLoad client script to automatically download the attachment.
function onLoad() {
openUrl("sys_attachment.do?sys_id=" + g_form.getUniqueValue());
g_form.addInfoMessage('Attachment downloaded');
}
function openUrl(url) {
this.open(url);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2022 11:12 AM
Hi Derek, I'm having this same issue and I'd like to use the solution you listed here. Can I ask where you put the above script? I am not sure if I should put it on the case table or the attachments table. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2022 03:03 PM
Hey Jasmine,
The exact configuration for this script is:
- Script type: Client script
- Name: Workspace - Download Attachment onLoad
- Table: Attachment [sys_attachment]
- UI Type: Mobile/Service Portal
- Type: onLoad
- Script:
function onLoad() {
openUrl("sys_attachment.do?sys_id=" + g_form.getUniqueValue());
g_form.addInfoMessage('Attachment downloaded');
}
function openUrl(url) {
this.open(url);
}
When the attachment is clicked in the related list on agent workspace, this should automatically download the attachment.