Export to PDF UI Action

abhijats
Tera Expert

Hi Everyone,

Can you please tell me how to create a UI Action(Export to PDF) on ESS Portal for exporting the form(UI Page) in PDF Format, Actually we have to give functionality to user to extract the form from ESS Portal related to certain category and then use it in PDF Format.

27 REPLIES 27

Hello Jonathan,



I want to know will the PDF get saved some where?


Can I change some of the format on that PDF?



Thanks,


Uma


Uma,


Did you got the solution for how to format the PDF?



Thanks,


Krishnakanth


Uma,


I didn't really need any special format for the PDF, just a way to export and link to the current record.   We did get that done with the following script.


It works very well.



Thank you!


Brian



var rm = new sn_ws.RESTMessageV2();


rm.setHttpMethod('GET');


var url = gs.getProperty("glide.servlet.uri") + current.getTableName()+ '.do?PDF&sys_id=' + current.sys_id;


rm.setEndpoint(url);


rm.setBasicAuth(gs.getProperty('App_Serviceaccount'), gs.getProperty('App_Serviceaccount_pwd'));


rm.saveResponseBodyAsAttachment(current.getTableName(),current.sys_id,current.u_cpen_number+".pdf");




var response = rm.execute();


if(response.getStatusCode()==200) {


  gs.addInfoMessage('Attachment added, sending to distribution.');


  action.setRedirectURL(current);


Hi Brian,



I need something like few records with custom formatted UI. Do you have any Idea to do this?


Try this Venkata Chandra Mohan Reddy Yaparla



HR PDF document templates


It is a new feature as of Helsinki that gives us the ability to create custom PDF files.


Good luck!



Brian