Store PDF anywhere in snow and use it in work order table using UI Action
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 04:56 AM
I have a requirement - I have a PDF file that I need to store in somewhere in servicenow and In the work order (wm_order) form I have to create a related link to download that PDF based on condition that work order type should be DSS then only the link should appear and when I click it that PDF should attached to the form (wm_order) or download.
I have tired storing the PDF file on document template (sn_doc_template) table which has scoped app - Document Template and created related link on wm_order. And when clicked it the error is populating cross scoped privilege's
below is the ui action code to download the pdf
function reopen() {
var gr = new GlideRecord("sn_doc_template");
gr.addQuery('sys_id', '068e2df1fbc24290b70ffb5ebeefdc8a');
gr.query();
var result = gr.getValue('document');
// gs.addInfoMessage('hey');
if (gr.next()) {
current.u_proposal_attachment = result;
gs.addInfoMessage('entered if');
// gsftSubmit(null, g_form.getFormElement(), 'generate_pdf');
action.setRedirectURL(current);
return result;
// }
}
0 REPLIES 0