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-21-2023 08:26 AM
@singhajeet Try forming your href like following.
https://instance-name.com/sys_attachment.do?sys_id=12c0286a1b7161106c1aa86fe54bcb54
//Here sys_id should be the sys_id of your attachment record in sys_attachment table 12c0286a1b7161106c1aa86fe54bcb54
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-23-2023 11:07 PM
Hi Sandeep,
Thanks for your valuable response!
I already tried that with sys_id of the attachment table, but not working.
Thanks
Ajeet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-23-2023 10:58 PM
What's your business requirement here?
where is that file stored?
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-23-2023 11:14 PM
Hi Ankur,
The business requirement is - We have to add a file downloadable link on the UI page and the file is stored in the sys_attachment table.
I have tried with the sys_id of the sys_attachment table but getting errors like request attachment is not find - https://instance-name.com/sys_attachment.do?sys_id=12c0286a1b7161106c1aa86fe54bcb54
Regards!
Ajeet