Open attachment in related list in Workspace

Derek C
Tera Guru

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.

1 ACCEPTED SOLUTION

Derek C
Tera Guru

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);
}

View solution in original post

6 REPLIES 6

Pranesh072
Mega Sage
Mega Sage

Yeah the behaviour is different on the agent workspace instead you can use OOB attachment section 

 

find_real_file.png

Thanks Pranesh,

The reason we rely on the related attachments is because all of the customer interaction is done at the REQ level, however all technical work is done on the TASK level. Therefore we use the attachment api's to sync all attachments up to the REQ level, and use the related attachments list to view attachments from the TASK.

Any thoughts on how this can be accomplished in Workspace?

Thanks,

- Derek 

Derek C
Tera Guru

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);
}

Hey Derek, 

We're trying to pull this off as well as we have a related list that is showing RITM attachments on the catalog task record.  Which record in workspace are you putting this on?  Is this on the attachment record itself or are you automatically downloading attachments when the Catalog Task is opened?

Thanks in advance.