- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2021 05:16 AM
Hi,
We are using Report vaccination to collect the employee's vaccination details. As part of this process, they will upload their vaccine card, which will be verified by HR. Is it possible to view the attachment on the platform without downloading it?
Document Viewer plugins are installed and required system properties are set. Still not able to view the file from the sys_attachment table. Am I missing anything? Please suggest.
Thanks,
Bindu
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2021 08:39 AM
Hi
I think I have a suitable solution for you. Just configure the following UI Action:
For better copying the script code:
function openViwer() {
var sysId = typeof rowSysId == 'undefined' ? gel('sys_uniqueValue').value : rowSysId;
var url = new GlideURL('sys_attachment.do');
url.addParam('view', 'true');
url.addParam('sys_id', sysId);
g_navigation.open(url.getURL(), '_blank');
}
After that, you will have a new item at the context menu in the list view:
Kind regards
Maik
If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2021 06:22 AM
Hi
no that is not possible OOTB, as you have no record view at table sys_attachment.
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2021 07:37 AM
Hi Hima,
Just tweak your URL a bit and you can see the document without downloading.
Suppose your sys_attachment record has sys_id=YourAttachmentSYSID.
Use this URL->
<yourinstance>.service-now.com/sys_attachment.do?sys_id=YourAttachmentSYSID&view=true
view=true when passed with the URL will allow you to see it without downloading.
Mark my answer correct if it resolve your query.
Regards,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2021 08:39 AM
Hi
I think I have a suitable solution for you. Just configure the following UI Action:
For better copying the script code:
function openViwer() {
var sysId = typeof rowSysId == 'undefined' ? gel('sys_uniqueValue').value : rowSysId;
var url = new GlideURL('sys_attachment.do');
url.addParam('view', 'true');
url.addParam('sys_id', sysId);
g_navigation.open(url.getURL(), '_blank');
}
After that, you will have a new item at the context menu in the list view:
Kind regards
Maik
If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2021 10:12 AM
This is great! It worked well. Thank you, Maik.