Export Assessment User Responses in to PDF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2024 09:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2024 11:48 PM
Hi @Lokesh5
You can create a UI action to achieve this. Refer below post and give it a try :
https://www.servicenow.com/community/developer-forum/generate-pdf-from-ui-action/m-p/1457260/page/3
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2024 12:53 AM
Hi @Lokesh5
You can create an UI Action to fulfill this requirement. Please have a look and try for your requirement. Below script can be used:
function generatePDF(){
var view = 'pdf_view';
var url = '/' + g_form.getTableName() + '.do?sys_id=' + g_form.getUniqueValue() + '&sysparm_view=' + view + '&sysparm_media=print' ;
window.open(url,"_blank");
}
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.
********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect
Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2024 01:18 AM
Hi @Lokesh5 ,
yes you can generate the PDF using client side UI action
check if this helps you; it would show UI action for user to download the PDF of the record
UI action steps
Client - checkbox True
OnClick - generatePDF()
Form Button - True
Form context menu - True
Script:
function generatePDF(){ var url = '/' + g_form.getTableName() + '.do?sys_id=' + g_form.getUniqueValue() + '&PDF'; window.open(url,"_blank"); }
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2024 07:24 AM
Hi @Lokesh5
What is use case here. It will be a customization.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************