- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2022 03:44 AM
Hi Team
I have a requirement to view a PDF document via service portal. I am using service catalog record producer to enter data from the service portal.
Would you pls help me to know, how to view/open a PDF document or add the link of that PDF file to the service portal.
I am using Rome version
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2022 08:03 AM
Hi,
you can use Rich text label variable and include link in it
Based on the Centre selected you can show/hide the variable using UI policy and then user can view the link and download the file
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-07-2022 10:07 PM
Hi Ankur
I was able to get the link of the PDF file to the service portal. But after clicking it, it is downloading. I want to open it on a separate window. I have added 'view=true' to the end of the URL. But no luck. Is there any possible ways to do it ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2022 10:24 PM
Hi,
I hope Document viewer plugin is activated in your instance.
If yes then you can view it like this
-> give sysId of the sys_attachment record here and open this URL in new tab
/$viewer.do?sysparm_stack=no& sysparm_sys_id=c559fac007c011102011ff208c1ed050
OR
Another method is to use widget and show the pdf content inside it; show/hide the variable based on your UI policy
how to render pdf content inside widget; check this solution I shared 1 year ago
Attach a default pdf to service catalog item
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-08-2022 12:00 AM
Hi Ankur
this is the URL i am using
https://advancedserviceprovidersaaspdemo10.service-now.com/nav_to.do?uri=sys_attachment.do?sys_id=259a0f801b4851102d339936b04bcb4f&view=true
AND this is the URL, that I have changed according to your given format
https://advancedserviceprovidersaaspdemo10.service-now.com/nav_to.do?uri=sys_attachment.do?$viewer.do?sysparm_stack=no& sysparm_sys_id=259a0f801b4851102d339936b04bcb4f&view=true
But is displays empty page and Attachment not found
Can you pls help to advise ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2022 10:25 PM
I hope I have answered your original question.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader