UI Action to export to pdf

uma17
Tera Guru

Hi All,

I have created a UI Action to download the form details into pdf.

  1. function createPDFESS() {  
  2.   var sysparm_table = g_form.getTableName();  
  3.   var sysparm_sys_id = g_form.getUniqueValue().toString();  
  4.   var url = sysparm_table + '.do?PDF&sys_id=' + sysparm_sys_id;  
  5.   window.open(url);  
  6. }  

I want to know will the PDF get saved some where?If yes, where can I find the download later

Can I change the format on that PDF? Some fields and their values are not aligned properly.

Thanks,

Uma

2 REPLIES 2

ashik1
Kilo Guru

Hello Uma,


Your code is fine. When you call this function it downloads the data in PDF format.


In your browser uncheck auto download option and you will be able to download in specified location. In line 4 you can replace "PDF" with "EXCEL" or "CSV" to change the file format


Thank you Ashik.



I want the downloaded files to be saved automatically in some place in service now itself, is it possible?



I want to edit some field in the pdf document..For Example I have a field Value whose value is printed very far from the field name something like below, can I have that value of Value field to be aligned to Name & Phone?



Name : XXXX


Value                                                                                                                     100


Phone XXXXX



Thanks


Uma