Download Attachment upon clicking an UI action in Workspace.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2022 12:05 AM
Hi All,
I have an UI action called Download Template in scoped application which downloads the attachment into system . I am trying to create a workspace View for the table and added the button in Form actions and added Workspace script . Upon clicking the Download Template button in workspace. It is redirecting to Picture 2 rather than downloading the attachment. IIt is working fine in UI 16 View Not working proper in Workspace. How to correct this . Please help.
Picture1:
Picture 2:
Thanks & Regards
Swathi Padighar
- Labels:
-
Workspace : Next Experience
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2022 12:32 AM
Hi,
for the UI action to work in workspace you should write code in workspace client script
share your complete script and UI action configuration screenshot
Regards
Ankur
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-06-2022 01:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2022 02:12 AM
Hi,
you didn't share the complete script
Regards
Ankur
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-06-2022 02:58 AM
Hi ,
It is redirecting to attachment URL in UI action script . This is the script.
var URL = '/sys_attachment.do?sys_id=' + attachmentSysID ;
action.setRedirectURL(url);
action.setReturnURL(current);