How to generate PDF file for transaction record against its specific form template in SuiteScript 2.0
In this post, I will share how to generate a PDF document for a transaction record in a suitelet using suitescript 2.0. Definitely to understand this post, you must have some understanding of SuiteScript 2.0 and Suitelets. To make it simple I am using hard coded values for transaction id and transaction form template id. var tranId = 7626; var customTranTemplateId = 126; To get the transaction's form template id, you will need to navigate to the main menu than Customization → Forms → Transaction Forms and copy the internal id of template (in my case it is sales order's customize form id). Create a TemplateRenderer object. var renderer = render.create(); Now, the important step is to load the transaction record and merge it with template content. var transactionFile = render.transaction({ entityId: tranId , printMode: render...