In Focus Resource Center > Insights

Dynamically Print Items on a NetSuite Sales Order Using Advanced PDF Templates

By Robert Minerva .

NetSuite uses a popular Java reporting tool produced by Big Faceless Organization (BFO) to create crisp documents that are easily printed, emailed, and sent in a PDF format. Using the built-in advanced PDF templates, robust looking documents tailored to your business needs without costly customizations are created. To develop impressive documents, you will need a bit of HTML knowledge and a familiarity with the template language used by the BFO report generator called FreeMarker. One simple customization allows users to choose which items will print on a NetSuite sales order.

Companies often need to include items on sales orders that they do not want their customers to see on a printed document. Sometimes companies use this to include a gift with purchase (GWP) without showing the actual item line, since the description might contain a marketing blurb. Some descriptions can serve as messages for warehouse pickers with directions about the product that customers purchase. Other organizations may instead use the description to include comprehensive product information or components that they sell within a kit.

In cases like this, specific items are selected to print on sales orders and those that will not. These simple steps outline how to achieve this:

Step 1: Add a custom column field to a NetSuite sales order to indicate if an item should print

  1. Add a check box field that defaults to being checked on the sales order. In this example, it has the label Print on Sales Order.


  2. After adding the field, go to the sales order form to position the field in the line item list. To do this, go to Customization > Transaction Forms and select Standard Sales Order. Find the column on the Screen Fields – Columns tab. From there, drag the handle to the position that you want your field to appear.


    This is the sales order form with the Print on Sales Order custom column.


Step 2: Modify the advanced PDF template using custom fields to print line items

  1. Modify the NetSuite sales order template by navigating to Customizations > Forms > Advanced PDF Templates. Then, select the template for your sales order. Note: To get to the markup language, you must accept the warning after hitting the “Source Code” button.


    Once you are viewing the source code, you can see a combination of HTML and FreeMarker. FreeMarker is the template engine that BFO uses to manipulate PDF files that NetSuite produces. The basis is HTML form, except, in this case, it is within a tag. There are still and sections, and style sheets are still used to manipulate the appearance.

  2. Navigate to a table that prints the lines items. You can use a search (Ctrl F) of “record.item” to find tables. You will notice a table row prints for every line item. To control whether the row prints, surround the row with a FreeMarker if condition. This will test if the “Print on Sales Order” field was checked. Note: Since this field was from a data type checkbox, you have to first cast it as a string. Doing so will allow you to see if the column was actually checked.


  3. Save the template and use the template formatting tool to validate changes. Next, go to the custom form and select the template you just modified. This tells NetSuite to use this template on this custom form.


Now, all that is left is to check to see if it worked. Go to the sales order list and select the sales order you just entered to print as a test.


The first line and the third line are printed. However, it omits the second line (i.e., the free chair).

How Citrin Cooperman can help

With a little HTML knowledge in addition to some FreeMarker syntax, you can create robust documents from NetSuite. These documents will not only look good but also extend functionality for an ever-changing business.

NetSuite support provided by Citrin Cooperman

Citrin Cooperman’s Digital Services Practice helps companies maximize the benefits of their technology investments to achieve their strategic goals. To learn more about building advanced PDF documents in NetSuite or if you are looking to get more out of your NetSuite investment in general, reach out to your Citrin Cooperman advisor or Robert Minerva at

Our specialists are here to help.

Get in touch with a specialist in your industry today. 

By your submission of information in this form, you are consenting to our collection, use, processing and storage of your information in accordance with Citrin Cooperman’s privacy policy. If you have questions regarding our use of your information, please send an e-mail to