Use an Existing Custom Advanced PDF/HTML Template as a Context Response of Suitelet via Suitescript 1.0

Scenario In SuiteScript 1.0, the method setTemplate(template) only passes the raw string of the template therefore, the advanced pdf template id cannot be used as its parameter. Unlike in SuiteScript 2.0, the method setTemplateById(options) can pass the internal id of the advanced PDF template.    Solution To be able to reference/use an existing Advanced PDF Template… Continue reading Use an Existing Custom Advanced PDF/HTML Template as a Context Response of Suitelet via Suitescript 1.0

Resolve Error: ” child is text node, which is disallowed” When Printing GL Impact Using Advanced PDF Templates

Scenario There are cases when users encounter an unexpected error: The template cannot be printed due to the following errors: Error on line 7, column 14 in template. Detail… <macro> child is text node, which is disallowed: ignoring” This line of code<macro> child is a text node, which is disallowed: ignoring” when printing the GL… Continue reading Resolve Error: ” child is text node, which is disallowed” When Printing GL Impact Using Advanced PDF Templates

Check Voucher PDF Template

<?xml version=”1.0″?> <!DOCTYPE pdf PUBLIC “-//big.faceless.org//report” “report-1.1.dtd”> <#assign checkNo = ”><#assign checkDate = ”><#assign payName = ”><#assign payAddress =”><#assign totalAmount = 0> <pdfset> <#list records as check>   <#assign checkNo = check.checknumber>     <#assign checkDate = check.trandate>     <#assign payName = check.entity>     <#assign payAddress = check.entity.address> <pdf> <head> <link name=”NotoSans” type=”font”… Continue reading Check Voucher PDF Template

Ensuring Correct RTL Display for Mixed Arabic and English Text in NetSuite Advanced PDF Templates

When generating PDF documents in NetSuite using Advanced PDF templates, you might encounter challenges when displaying mixed Arabic and English text. While Arabic text should naturally render from right to left (RTL), embedding English text within Arabic strings can disrupt this flow, causing display issues. Simply applying dir=”rtl” or direction: rtl; in your HTML styling… Continue reading Ensuring Correct RTL Display for Mixed Arabic and English Text in NetSuite Advanced PDF Templates

Print One Check Per Page When Bulk Printing With Advanced PDF/HTML Templates

There are cases wherein users need to print only one Check per page when Bulk Printing with Advanced PDF/HTML Templates. Navigate to Customization > Forms > Advanced PDF/HTML Templates Standard Check PDF/HTML Template: Click Customize Top right corner: Toggle Source Code Paste the following code before the ending </body> tag: <div style=”position: relative;height: 250pt;”> </div> Copy Click Save

Change Currency Format of Calculated Field Displayed on Advanced PDF/HTML Template

Calculated field in Advanced PDF/HTML Template ignores the system number formatting, therefore, the field ${record.subtotal + record.discounttotal} appears on the printout with no currency symbol at the beginning, with no decimal places and with different formatting compared to other numbers. To resolve, the HTML code needs to be updated. Solution Navigate to Customization > Forms > Advanced PDF/HTML Templates Preferred Advanced PDF/HTML Template: Click Edit/Customize… Continue reading Change Currency Format of Calculated Field Displayed on Advanced PDF/HTML Template

TO PUSH THE ADVANCED TEMPLATES TO GIT REPOSITORY

Create the git branch. Create the Project. Inside the projects objects folder using the command Palette. Import objects. select the advance PDF template Now from the list choose the PDF template using internal id and the push it to the git repository.

nsformat_*()

NetSuite formatting is lost when you customize NetSuite standard fields. If you print hard-coded values which came from a custom data source or were calculated from standard fields, the format will not be consistent with the format of standard record fields. When editing the template source code, the nsformat_*() formatting method makes it possible to… Continue reading nsformat_*()

Upload and Use True Type Font (TTF) File in an Advanced PDF/HTML Template

Scenario While printing using Advanced PDF/HTML Template with special or lingual characters, some will not show on the printout. An example of these are Thai characters. Solution Upload the .TTF font file in NetSuite. Note: Make sure the Available Without Login is checked. Copy the third URL field on the uploaded File record and replace the ampersands symbols… Continue reading Upload and Use True Type Font (TTF) File in an Advanced PDF/HTML Template

Make the first line of address bold in advanced pdf template

Scenario: How to make the first line of the address bold through xml? Solution: <span style=”font-size:10px;line-height:2″>Consignee (Ship to)</span><br /><br/> <#assign shipaddress = record.shipaddress>   <#assign shipaddressLines = shipaddress?split(“<br />”)>     <#assign x = 1>     <#list shipaddressLines as line>  <#if x == 1>         <b> ${line}</b><br/>     <#assign x = x+1/>     <#else>     <span> ${line}</span><br/>     </#if>   </#list>