- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-16-2020 06:33 AM
I have a requirement to download all attachments on a table from a button. I have tried using a UI Action and Processor, via this link
https://www.servicenowguru.com/scripting/download-attachments-zip-file/#comment-34336
But It cannot find the Processor. I believe I read that it is deprecated now as I am in New York.
Does anyone have a current solution to this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-16-2020 01:54 PM
Hi
I got it working as a list UI action on incident table. You'll get one zip for each sys_id passed.
Below is the UI action script:
function downloadAll() {
selSysIds = g_list.getChecked();
sysIdList = selSysIds.split(',');
for (var i=0;i<=sysIdList.length;i++)
{
window.open('/download_all_attachments.do?sysparm_sys_id='+sysIdList[i],"_blank");
}
}
Here's the UI Action screenshot for the setting that I had used:
Thanks & Regards,
Rishabh Jha
Aavenir (http://www.aavenir.com/)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-16-2020 07:39 AM
Hi,
I haven't tested it, but reading quickly through what Mark wrote, you also need to create the processor yourself, not only the UI Action. Have you done that?
//Gƶran
Feel free to connect:
LinkedIn
Subscribe to my YouTube Channel
or look at my Book: The Witch Doctor's Guide To ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-16-2020 10:09 AM
Yes. but it gives me a
The page you are looking for could not be found
error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-16-2020 10:12 AM
I am on the New York release, so I believe that new Processors are no longer supported? I did find an out of the box download all attachments processor though. Now I just need it to download from a list instead of individual records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-16-2020 07:47 AM
Hi
Create a UI action on your table, and add the line below to the script:
gs.setRedirect('/download_all_attachments.do?sysparm_sys_id='+current.sys_id);
Thanks & Regards,
Rishabh Jha
Aavenir (http://www.aavenir.com/)