In 2015 NetSuite released Advanced PDF/HTML Template technology. This is a major step forward in allowing NetSuite customers to produce great looking documents.

Sales Order
You’ll all have worked with NetSuite’s standard document generator and understand its limitations. For the most part, the template documents, such as invoices or statements, get the job done. However, if you wanted more complex output formatting, you previously had to move to SuiteScript.

Now the basic framework without the need for SuiteScript has been exposed via the “Advanced PDF/HTML Templates” feature. Once you enable this feature, you can use this tool to design your own PDF files without SuiteScript programming in many cases (though for particularly complex requirements, sometimes scripting remains the only option).

To enable Advance PDF Templates you first need to go to Setup>Company> Enable features then under subtab “Suite Cloud” check the Advance PDF check box.

General Orientation

The template technology uses a framework that combines both XML, HTML, CSS, and tags to drive the PDF generation. If you have someone within your company with a good understanding of HTML and Cascading StyleSheets (CSS) they should be able to get comfortable with this tool relatively quickly.
There is also a WYSIWYG editor which allows users to format documents without the need for code, meaning anyone can create great looking documents.

Header, Footer and Body Concepts

There are 3 parts to the NetSuite sample templates with HTML snippets called a header, a footer and the body. The body is where the main elements of your document is generated.

NetSuite Data References

These are some important concepts to understand:
Record: this is the primary data set you are referencing. If you are working with an invoice, you are effectively working with the equivalent of a transaction search and the results set of one invoice record object. Use the NetSuite Record Browser document located in Help for your field references.
Record. Item: the record object has an item sublist, as well as others. This tag “< #list record. Item as item>” is a directive to trigger the framework to create a loop with the content located between the closing tag. It then supplies the “item” element information so you can reference the record’s sublist contents.
companyInformation: this elements allows you to access the Company Information located under Setup, Company Information. For example, companyInformation.addressText will supply you your address defined globally.

To get the field names, you need to go to the home tab>Set Pretences and then check the “Show Internal IDs” box. This is per user preferences not a companywide setting.

Trial and Error Development

I recommend that when editing the source code it best practise to copy and paste the source code first onto a word doc or note pad just in case you make any mistakes. It can be a process so be prepared to go back and forth many times to get the results you are looking for.

Will the old PDFs go away?

Sooner or later, I believe NetSuite will stop supporting the current PDF Editor. No announcement has been in relation to this, meaning it’s unlikely to happen within the next few years. However, I recommend that NetSuite Champions should begin the planning process to switch over to the new layouts . And anyway, the new ones look much cooler!

Introduction training in Advanced PDF/HTML layouts

Wednesday 16th march, 10:00AM – 11:00AM

I’ll be running a training webinar to introduce users to the new layouts. Claire Estrellado will also be on the webinar and we will both have time afterwards to answer any technical questions. For those at the User Group two weeks ago, this is a slightly longer repeat of that presentation.