NetSuite Printing Templates
Dec 9, 2024

Introduction
Does your company care about how your printed materials look? If you don’t, then you should as a well-designed document helps your customers and vendors more easily understand the information that is being sent to them. If your company does but can’t get the format just right here are the capabilities that can help to make it right.
Out of the box NetSuite offers two options for Printing Templates, the first is the Basic Printing Layout Feature and the second is the Advanced PDF/HTML Templates Feature. While these 2 options may sound limited, continue reading on how you can extend the power of the Advanced PDF/HTMl Templates Feature using Suitescript and how I used this feature for some of my clients.
Printing Using the Basic Printing Layout Feature
The Basic PDF printing option can be edited using their built-in template editor in a WYSIWYG (what you see is what you get) format and while this is convenient for non-technical users, it does require a bit of trial and error to get it right. In addition, there are many limitations such as the inability to do conditional formatting and the controls to format sub-list data is minimal. The better option is to leverage the Advanced PDF/HTML template feature as NS will be deprecating this Basic Print Layout functionality in a future release.
Printing Using the Advanced PDF/HTML Templates Feature
The Advanced PDF/HTML Template feature is a highly customizable template as it supports current standards for CSS and HTML coding. Out of the box, NS provides standard advanced pdf/html templates for most record types which can then be customized by using their built-in template editor either in WYSIWYG format or in source code mode.
For technical users familiar with HTML and CSS syntax, in source code mode, your print layout can include conditional formatting using freemarker syntax. Not familiar with Freemarker? Follow this link for more information. https://freemarker.apache.org/
To apply an Advanced PDF/HTML Template to a specific transaction record, you must go to the record’s customize form setting and verify the “Print Type” is set to “Advanced” and then in the PDF Layout field populate the appropriate name of the Advanced PDF/HTML template. Setting the custom form’s “Form is Preferred” field will help to ensure consistency with user viewing the record and any printing that’s done will leverage the Advanced PDF/HTML template that was set. Note, for most customer accounts NS will by default enable the “Advanced PDF/HTML” feature. To ensure that the Advanced PDF/HTML Templates feature is enabled, go to Setup > Company > Setup Tasks > Enable Features (Administrator). On the SuiteCloud tab, under SuiteBuilder, ensure that the Advanced PDF/HTML Templates box is checked.
Due to the configuration of applying the Advanced PDF/HTML template file to the custom form of a record, the execution of printing will only be associated to the record based on the custom form settings. If your business requires a different print layout option for internal use which is separate from external use, then scripting with Advanced PDF/HTML templates could be the answer.
Scripting with Advanced PDF/HTML Templates
NS suitescript 2.x library supports the ability to generate an XML formatted print layout on demand or using an existing Advance PDF/HTML Template record. The execution of this print layout can be user initiated i.e. when someone views the record and clicks a button or via a scheduled script (including map reduce scripts) which generates the file in pdf format and saved to a predefined NS folder within the file cabinet or immediately emailed. On demand generated files in pdf format can be single page or multiple combined pages with different orientation settings as well as custom page size. The capability is almost endless, below are some use cases that I developed for some of my clients.
Scripted Advanced PDF File Use Cases
1) Custom Quality Control Report on a Work Order Record.
My client was creating an ISO certified quality control report referred to as a PPAP. Some of the information resided from the Work Order record and Sales Order Record. Custom Fields and Custom Records were used to store additional information. Several buttons were created via script to direct the process flow of data population with a final “View PPAP” button to generate the PPAP Report in PDF format.
2) Custom Shipping Labels.
My client was transferring inventory from their warehouse to an outsourced manufacturing vendor. The vendor required a specific label on each box. A custom script was created to display a generate “Ship XX Label” button which when clicked pulled information from the Transfer Order record line level details.
3) Custom Manufacturing Steps on Work Order Record.
My client was using NS Light Manufacturing function which is a work order record followed by a work order build record upon completion. My client wanted to include manufacturing steps based on components listed on the work order. To maximize printing efficiency, work orders that were released were to be printed all at once using a single pdf file. Several scripts were used to define the operating process flow with a final script combining all Released work orders to be combined into a single pdf file with each work order having its own unique manufacturing process steps.
Having NetSuite Print Layout Issues or Questions?
Let’s Talk! Give me a call at 617-733-4120 or send me an email at info@techliere.com!
Be sure to subscribe to receive my NetSuite Articles.