Automatically pdf download when click on ui action button on the incident

rachuri john
Tera Contributor

  hi 

   my requirement is when click on generatepdf button on incident form then pdf download automatically and content in the pdf is only incident number of the current record.

4 REPLIES 4

Nikhil Soni 007
Giga Guru

1) Create one UI Action in that Table ( Make that as form button)

2) In Script:

function printPDF(){
var uri = g_form.getTableName()+'.do?sys_id='+g_form.getUniqueValue()+'&PDF';
g_navigation.open(uri);
}
3) In Onclick : printPDF();
 
Please mark this correct if it is helpful!

 

Please mark this as correct if it is useful

 

hi nikhil 

thanks for your response

  it is working but my requirement is the pdf having only incident number (not all data of the record)

 and pdf name is also incident number 

Which all fields is present in list view?

yes