Add file downloadable link in UI page from sys_attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-21-2023 05:26 AM
How to add file downloadable links in UI pages from sys_attachment table.
I have tried a few options and putting anchor value in the href like below
https://instance-name.com/ui_page.do?sys_id=12c0286a1b7161106c1aa86fe54bcb54
I am getting errors like
Requested attachment does not exist
Even file is there I can able to download it from the sys_attchment table
@Ankur Bawiskar, Please help me on the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-24-2023 07:31 PM
where you want to show this UI page to users?
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-24-2023 11:16 PM - edited ā04-24-2023 11:17 PM
Hi @Ankur Bawiskar ,
UI pages can be used by internal users only. We have to create html form where I have to fetch the sys_id and filename from the sys_attachment table by user id and then I have to add the respected value into a tag like this- <a href="https://instance-name.com/sys_attachment.do?sys_id=12c0286a1b7161106c1aa86fe54bcb54">file_name</a>.
Hope I am able to explain you š
Thanks
Ajeet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-24-2023 11:26 PM
Still I am not clear where you want to show this link to user?
Do you want to show it on catalog form during submission?
What's the screen ?
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-24-2023 11:38 PM - edited ā04-24-2023 11:56 PM
Just want to create a UI page with a sample downloadable file. Where the user can click on the link and download the file. There is no catalog and no submission is required. Assume file is exist in the sys_attachment table along with sys_id.
Thanks
Ajeet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-24-2023 11:51 PM
how will end user navigation to this screen?
is it via email body which they receive?
May be I am not able to understand the business use-case here.
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader