NetSuite Advanced PDF Templates are a great way to turn out- of-the-box invoices or checks into a custom designed document tailored to your business. When I first approached the templates as a NetSuite consultant, my knowledge of HTML and FreeMarker were limited. It was quite a process figuring out how to discover a field name or see if an area of the template was working properly.

Since then, I have learned some great tips I’d like to share with you:

1. Save, Save, Save

The greatest piece of information I can give you is to save a copy of everything you are doing offline. Anytime a significant change is made, copy the HTML and paste it into a word document. If you eventually find yourself in a situation where the HTML has a flaw and cannot render a PDF, at least you have a backup of your last known working version of that document.

2. Offline HTML editor

The error messages supplied by NetSuite can be difficult to understand at times. Having an HTML editor that can locate broken code can be life saver. There are many programs out there with free versions.

3. User interface vs Source code

The user interface supplied by NetSuite can be great for quick changes such as a font size or logo size, but I would strongly recommend using the source code for anything else. Occasionally the user interface will insert spaces that break the code and prevent the PDF editor from rendering. It is always best to use the source code but I know that can be difficult to manage if you are new to HTML.

User Interface                                                             

NetSuite Advanced PDF UI

Source Code

NetSuite advanced PDF Source Code

4. Logo

Logo sizing might need to vary per document. On occasion you might need it larger on an invoice but smaller on a purchase order. Selecting the standard sizing through company setting will not help you in this situation. By double-clicking on the logo in user interface, pixel/size settings can be pulled up and reset. The other option is to edit through the image size in the source code in the header of the document.

User Interface                                                               

NetSuite Advanced PDF Logo Editor UI

Source Code   

NetSuite Advanced PDF Logo Editor source code

5. Field identification and the Schema browser

Finding the internal name for a field can be difficult in NetSuite. Its function doesn’t necessarily dictate how NetSuite named it internally. The customer on one form could be the entity on another, making it difficult to look for the right field name. For custom fields they will be sourced as follows: ${record.custbody_field_internal_id}. So if you have created a custom note field name “Notes” the internal id might be custbody_notes (Image 1). To bring this field into an advanced PDF template it would look like ${record.custbody_Notes} (Image 2).

If it is an out-of-the-box field, the formatting is as follows: ${record.internal_id}. An example of this is billing phone. If I wanted to reference billing phone on a purchase order it would look like ${record.billphone} (Image 3). If this does not work, the field might have to be referenced in the schema browser records section. Look up the document you are working on to locate the proper name for that particular use (Image 4).

Image 1                                                          

NetSuite Find Field ID

Image 2

NetSuite Dynamic Custom Field Advanced PDF editor

Image 3                                                           

NetSuite Dynamic OOTB Field Advanced PDF editor

Image 4

NetSuite Schema Browser

6. Testing

Testing can be difficult at times. The preview feature of the advanced PDF template will bring in text, but that might not be the type of information needed to review formatting of a particular field (Image 1). I recommend creating a test document where all fields are filled out (Image 2). This way when the advanced PDF template is saved and the test document is generated, you can see a real time result (image 3).

Image 1                                                                        

NetSuite Advanced PDF Preview PO

Image 2

NetSuite Purchase Order

Image 3

NetSuite Advanced PDF Purchase order

In conclusion, I would like to remind you of one thing. All changes can be undone. Each custom document is a copy of the original NetSuite version. With just a few clicks, the standard version can be put back in place. HTML isn’t something you learn overnight and this journey takes time. Do not quit right away, with patience you can have great looking advanced PDF custom documents!

Need more NetSuite help? Learn more about our NetSuite services or schedule a free consultation with us to get started.

Additional NetSuite Resources

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

How to Create an ‘After Field Edit’ Trigger on NetSuite Workflow Actions

NetSuite: A Unified Platform for Business Data