Rendering Custom record PDF in suitescript

For rendering a custom record PDF, First step is to create a template for the custom record.

Code snippet:

 var renderer = render.create();
 renderer.addRecord('record', record.load({
     type: 'custom_rec_type',   // specify the custom record type
     id: parseInt(recId)
 }));
 renderer.setTemplateByScriptId("CUSTTMPL_108_5272043_SB1_890");// specify the template Id.
 var spiffPDF = renderer.renderAsPdf();

Leave a comment

Your email address will not be published. Required fields are marked *