- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 05:17 AM
Hi,
Any suggestion on how to create a UI action that export a task record (in pdf format) and all attachments on that task record to a zip file on the users desktop ?
Thanks.
Regards
Kim
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 07:13 AM
to download a record in PDF simply form the URL and open the URL in new tab
function downloadRecordZip() {
var url = '/incident.do?sys_id=' + g_form.getUniqueValue() + '&PDF';
g_navigation.open(url, '_blank');
g_navigation.open("/download_all_attachments.do?sysparm_sys_id=" + g_form.getUniqueValue(), "_blank");
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 07:13 AM
to download a record in PDF simply form the URL and open the URL in new tab
function downloadRecordZip() {
var url = '/incident.do?sys_id=' + g_form.getUniqueValue() + '&PDF';
g_navigation.open(url, '_blank');
g_navigation.open("/download_all_attachments.do?sysparm_sys_id=" + g_form.getUniqueValue(), "_blank");
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2024 03:20 AM
Hi Ankur,
Thanks for your reply 🙂
Regards
Kim