Need to add two more fields to the script mention below

marrikruthi
Tera Contributor

generate and download pdf , the pdf contain only patient name, doctor name, patient id, dob, phone number, email,gender.
I have written this script and it is showing only one field but I want above mentioned fields


var inc = current.u_name;
var pdfGenarator = new sn_pdfgeneratorutils.PDFGenerationAPI();

var pdfResult = pdfGenarator.convertToPDFWithHeaderFooter(inc, 'u_patient_details', current.sys_id, inc + ' Number PDF');

if (pdfResult) {
action.setRedirectURL('https://dev217853.service-now.com/sys_attachment.do?sys_id=' + pdfResult.attachment_id);
}

2 REPLIES 2

Mark Manders
Mega Patron

You forgot to put in the information needed to help you. 'Add two more fields to the script' as title and then just a script, doesn't tell us what you are trying to achieve.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Mark Manders
Mega Patron

Next to that, you have been asking about this functionality in 5 posts now and are not telling what you already tried/what solutions were already offered. You are ignoring people that are trying to help you or only respond with 'this does not work' without showing what you actually did and what the result was. 

The solutions already provided are solid ones and without knowing what you tried (and the results), you will only receive the answers that were already provided to you over and over again.

https://www.servicenow.com/community/developer-forum/generate-pdf-and-download-when-click-on-print-b...

https://www.servicenow.com/community/developer-forum/generate-pdf-and-download-when-click-on-print-b...

https://www.servicenow.com/community/developer-forum/generate-and-download-pdf-only-multiple-fields-...

https://www.servicenow.com/community/developer-forum/generate-a-pdf-of-selected-fields-in-a-form-usi...

 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark