Show components of Kit as in format of below in advanced PDF print <#if record.item?has_content> <table style=”width: 100%;”> <#list record.item as item> <#if item_index==0> <thead> <tr> <th align=”left” … Continue reading Show Kit Components in Packing Slip print
Tag: Advanced PDF
Convert String into Object in Advanced PDF Template
In FreeMarker, you can use the ?eval directive to evaluate a string as a FreeMarker expression. Here’s how you can convert a string representing a JSON object into an actual object in an Advanced PDF/HTML template: <#assign jsonString = ‘{“line”:”1″,”remaining”:1}’> <#assign jsonObject = jsonString?eval?json_string> <tr> <td>Line: ${jsonObject.line}</td> <td>Remaining: ${jsonObject.remaining}</td> </tr>
Display barcode of transaction record on the footer along with the page number using advanced PDF/HTML template
Provide the code below in the advanced PDF/HTML template <macro id=”nlfooter”> <table border=”0″ cellpadding=”1″ cellspacing=”1″ style=”width:100%;”><tr> <td style=”width: 80%;”><barcode codetype=”code128″ showtext=”true” value=”${record.tranid}”/></td> <td align=”right” style=”padding: 0;”><pagenumber/> of <totalpages/></td> </tr></table> <div style=”text-align: right;”> </div> <p> </p> </macro>
Display Lot Number Column on Advanced PDF/HTML Template for Invoice
In an Advanced PDF/HTML Template for Invoice, the Lot Number column is required to be displayed. Navigate to Customization > Forms > Advanced PDF/HTML Templates Preferred Advanced PDF Template: Click Edit Source Code: Add below code <#if record.class = “04 Aviation”> <th align = “right” colspan “4”> Lot Number </th> <#else> <th></th> <#if> <#if record.class = “04 Aviation”> <td align = “right” colspan… Continue reading Display Lot Number Column on Advanced PDF/HTML Template for Invoice
Convert Amount to Number in advanced PDF template
An error is displayed as “Can’t convert this string to number” when attempting to generate the PDF. This error arises because the number retrieved from the record might be interpreted as a string, which prevents the successful generation of the print. To address this issue, please refer to the sample code provided below for a… Continue reading Convert Amount to Number in advanced PDF template
Print Item Name/Number Instead of Display Name on Price Lists
Create a separate field that contains the value of the Item Name/Number and reference that field instead. Solution Create Custom Item Field Navigate to Customization > Lists, Records, & Fields > Item Fields > New Label: Enter LabelExample: Printed Name ID: Enter _printed_name Type: Select Free-Form Text Store Value: Enter Checkmark Click Applies To Necessary Item Type(s): Enter Checkmark Print on Price List: Enter Checkmark Click Save Perform Mass Update Navigate to Lists > Mass Update > Mass Updates Click General Updates Items: Click the… Continue reading Print Item Name/Number Instead of Display Name on Price Lists
Adding Fonts for Languages that Use Symbols
For languages that use symbols, such as Arabic, values in columns (POS, Quality, and so on) of Advanced PDF/HTML email attachments can appear empty. NetSuite views the symbols as missing fonts, and therefore leaves the fields blank. To have these symbols or fonts appear, users affected by this must customize standard templates based on language… Continue reading Adding Fonts for Languages that Use Symbols
Displaying Proper Currency Symbols on Advanced PDF/HTML Template
Solution
Add Hyperlink to Advanced PDF/HTML Templates that will Open in a New Window/Tab
When printing records in NetSuite using Advanced PDF/HTML Templates, there are third party libraries used for generating the documents to PDF format. One of the major libraries is Freemarker (Engine template) with BFO (Used to convert XML to PDF). According to BFO documentation, the “href” tag is supported but with some limitations. Given the example: <a… Continue reading Add Hyperlink to Advanced PDF/HTML Templates that will Open in a New Window/Tab
Convert Numerical Sum From Integer to Currency in Advanced PDF/HTML Template
Advanced PDF/HTML templates allows simple computations through the use of the Freemarker language. For instances where values needs to be compared or displayed on a certain format, the Freemarker language has a built in function that converts the type casting of variables. Solution Navigate to Customization > Forms > Advanced PDF/HTML Templates Preferred Advanced PDF/HTML Template: Click Edit Create a variable to… Continue reading Convert Numerical Sum From Integer to Currency in Advanced PDF/HTML Template