Need help to set names for generated PDF documents.

sharandeep mada
Mega Contributor

I have used the share application to create PDF by setting template and creating attachments on targeted table records with business rule. 

Challenge: All the generated PDF's are without name (undefined .pdf) find_real_file.png

I want to set record.number as the name of pdf document

Please help me.

 

BR:

var documentBody = new genDoc_Ajax();
documentBody.setDocumentBodyServer(current);
var gdf = new GeneralDocFormv2('Demand assesment by user', current.sys_class_name, current.sys_id, current.number);
gdf.generate();

 

PDF generator from share: https://developer.servicenow.com/app.do#!/share/contents/3429377_pdf_generator?v=1.02&t=PRODUCT_DETAILS

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Sharandeep,

you can check the script include or business rule and check which contains the filename in the line of code.

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Sharandeep,

you can check the script include or business rule and check which contains the filename in the line of code.

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader