UI Action to export to pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2016 10:06 PM
Hi All,
I have created a UI Action to download the form details into pdf.
- function createPDFESS() {
- var sysparm_table = g_form.getTableName();
- var sysparm_sys_id = g_form.getUniqueValue().toString();
- var url = sysparm_table + '.do?PDF&sys_id=' + sysparm_sys_id;
- window.open(url);
- }
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2016 10:55 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2016 11:07 PM
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