ANS-1931 · PRINTING, PDF & EMAIL TEMPLATES

How to Customize Amount in Words and Payment Lists in NetSuite Advanced PDF/HTML Templates?

Learn to enhance NetSuite custom check templates by formatting numerical amounts into uppercase words and dynamically listing payments using FreeMarker expressions.

Short answer

To display an amount in words in all caps, use `${record.amount_in_words?upper_case}`. For listing payments, iterate through the `record.payments` list within an HTML table using FreeMarker's `<#list>` directive, dynamically populating rows with payment details like `${payment.some_field}`.

Scenario

NetSuite users often require advanced customization for their check templates, specifically to format numerical amounts into an all-caps text representation and to dynamically display a list of associated payments. This customization ensures that checks meet specific formatting standards and include all necessary transactional details directly on the printed document.

Solution

  1. To display an amount in words in all capital letters within a NetSuite Advanced PDF/HTML template, use the upper_case FreeMarker function. This assumes the "amount in words" is already available in a field on the record.n

n${record.amount_in_words?upper_case}n

n

  1. To build an HTML table that lists payments, access the list of payments from a field or subtab on the record, referred to here as "payments". The following HTML table structure demonstrates how to iterate through the record.payments list and display a field from each payment.n

htmln<table>n               <#list record.payments as payment>n                              <tr>n                                             <td>${payment.some_field}</td>n                              </tr>n               </#list>n</table>n

This example provides a basic structure that can be expanded for more complex lists by adding more elements within the tag.

Expert NetSuite Support

Need help with this NetSuite issue?

Printing, PDF & Email Templates consulting and configuration support

Talk to a consultant