Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Generate PDF from UI action

Juhi Jha
Tera Contributor

I have created a UI action which generates a print view which unnecessarly adds mores steps for the client to download pdf i want to download pdf by clicking of the button in the bellow format .

 

13 REPLIES 13

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");

}

 

Hello Juhi,

I found this article but looks like we cannot do much here:-

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0696160

Please mark answer correct/helpful based in impact

 

What if we need only specific fields 

Hi @Khalid828 ,
I have a similar requirement and was wondering if you could help me out, in case you’ve already found a solution.

Thanks in advance!