A link to an attachment from where the user should open the file and view it directly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 12:17 AM
Hi there!
I have a UI page from where I must provide a link to open the file which was attached in the ticket (excel, pdf etc.). When I do the following-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 12:48 AM
Hello @Aerial Reptile ,
Please use this href attribute value:
"/sys_attachment.do?view=true&sys_id=${attachment.sys_id}"
Please also make sure that the System Property "glide.ui.attachment.force_download_all_mime_types" is set to "false".
This might not work for all file types but I have verified that it works for PDF files.
Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 01:01 AM
Thank you for your reply, Robert!
I've modified the line as mentioned and I'm facing this error - The reference to entity "sys_id" must end with the ';' delimiter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 01:08 AM
enhance as this from previous reply
"/sys_attachment.do?view=true&sys_id=${attachment.sys_id}"
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
04-11-2025 01:10 AM
this link explains about the properties
Attachments prompting to be downloaded rather than opening directly when clicking "view"
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