Add "Download All Attachments" button on ticket form in Service Portal

Chris17
Tera Contributor

Hello,

I currently have a requirement to configure a button that allows for downloading all attachments added within in a ticket form on the Service Portal, see photo below

find_real_file.png

I know where to make these edits, but as to how I am unsure and inexperienced within the Service Portal. Any ideas?

1 ACCEPTED SOLUTION

DrewW
Mega Sage
Mega Sage

Hu, never looked into this before but there is a button on the platform UI Attachments dialog to download all attachments.  This is the function the button calls.

function downloadAllAttachments() {
    var downloadUrl = window.location.protocol + '//' + window.location.host + '/download_all_attachments.do?sysparm_sys_id=' + attachmentParentSysId
        + "&sysparm_this_url=" + getCurrentPageURL();
    window.location = downloadUrl;
}

 

So it looks like you can just add a button to your widget and then open a new tab/window to the above URL and you are all set.

View solution in original post

10 REPLIES 10

Hello Ankur,

 

Can we add download all attachment in service operation workspace?