Can we set a password to PDF/EXCEL using Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2020 03:10 AM
I have a requirement. On an incident form, i need a UI action button.If Someone clicks on that button, the current record should be download in PDF/Excel Format with password protection. Remember that Password protection is the Priority. Can we achieve this? If Yes, How?
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2020 03:17 AM
Hi Sanjay,
you can download it as plain-pdf; not sure whether it can password protected
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
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
05-18-2020 10:40 PM
Hi Sanjay,
Is this answered?
if my answer helped you, kindly mark it as ✅ Correct & 👍Helpful so that it does not appear in unanswered list & close the thread.
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
05-18-2020 11:07 PM
Hello Sanjay,
You may find below thread helpful (Password protection).
- Pradeep Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2020 11:57 PM
Hey Sanjay,
you can try the link that @pradeep shared and also try below code to create a PDF of current record
UI Action
Client checkbox - true
Onclick - pdfLoad()
script -
function pdfLoad(){
var sysparm_query = "sys_idIN" + g_form.getUniqueValue();
var sysparm_view = "default";
var dialog = new GwtPollDialog('incident', sysparm_query, 1, sysparm_view, 'unload_pdf');
dialog.execute();
}
kindly mark Correct and Helpful if applicable.
Regards,
Indrajit.