Advanced PDF/HTML
Templates
Rocky Mountain Netsuite User Group
March 2019
Agenda
Why Use Advanced Templates?
What Are Advanced Templates?
Some Examples
Netsuite Administrative Details
Break
Terminology
Using the WYSIWYG Editor
Example: Printing Search Results
Why Edit Source Code?
Example: RMNSUG Marketing Email Template
Resources / Q&A
Why Use Advanced Templates?
Create Beautiful PDF and/or HTML from data
in Netsuite.
Emailing or Printing
Any type of Transactions
Custom Records
Saved Search Results
Netsuite Email Marketing Campaigns
If you use Scripting…
ANY record which can be “printed” in Netsuite
Any Combination of Records
Netsuite Data *plus* “external” data.
What are Advanced Templates?
Rendering engine created by
Apache and bfo.com
XML (which you create) fed into
the above engine.
Supercedes “Basic Form Layouts”
Example: Packing Slip
Custom Logo
Custom Layout
Custom Colors
Barcode
Order-specific details
Example: Invoice
Line-item details
Remittance “tear off”
footer
Postal Barcode
Example: RMNSUG Email
Parameterized Values
(Lesson Learned!)
Calculated Datestamp
Administrative Details
Enabling this feature
Page: Enable Features | SuiteCloud |
“Advanced PDF/HTML Templates”
Finding (Most) Templates
Page:Advanced PDF/HTML Templates
Page: Marketing Templates
“HTML” or “PDF”? (Personal Preference)
Set Preferences | Transaction | “Printing”
Associating a Template to a Transaction
Page: Transaction Forms | Edit | “Printing
Type”
Break
Grab some coffee, it’s gonna get Technical!
Tech Terminology Crash Course
PDF - “Portable Document Format”
HTML - “Hypertext Markup Language”
XML - Extensible Markup Language
CSS - “Cascading Style Sheets”
FreeMarker - https://freemarker.apache.org/
BFO (v 1.1.6.1) - “Big Faceless Org” (https://www.bfo.com/)
Using the Advanced PDF/HTML WSYWIG Editor
Looks easy, but limited options.
Example: Create Letters from a Saved
Search
1) Create Header with WSYWIG
2) Create Footer with WSYWIG
3) “Source Code” view
4) Replace Table with Useful Snippet
5) Go back to WSYWIG view
Example: Printing a Saved Search
How to Print a single Page per Search
Result Row?
We also want a common “Header” and
“Footer” with each page.
Example: Printing a Saved Search
“Prints” Search Results into a more useful PDF
or HTML format.
1. Create and Save a Saved Search
2. “Edit” mode of your Search
3. Click “New Template” button
Or
Find your existing template in “Page:
Advanced PDF/HTML Templates”
Example: Printing a Saved Search
How to make one page per Search Row...
1. Trick: Add “page break” div in “Source Code”
mode. (See Snippet Below)
2. THEN Use WSYWIG Editor for content.
<#list results as result>
<div page-break-after="always">
Add Your content here from within
the WSYWIG.
</div>
</#list>
Why Edit Source Code?
In Essence… Control.
Page Breaks
Refined layout
Table Striping
Subsidiary Logos, Watermarks
Barcodes, Special Fonts
Looping through multiple records.
Very useful page!
https://freemarker.apache.org/docs/alphaidx.html
Example: RMNSUG Marketing Email Template
Trick: Specify details at top,
let template render later on.
Trick: Using <#assign>
Trick: Using “?date” builtin
Trick: Using “?string” to
format dates
We invite you to join the Rocky
Mountain NetSuite User Group on
<b>${rmnsugevent.date?string["EEEEE
, MMMMM dd, yyyy"]} from 8:00am...
Q&A - Helpful Resources
Netsuite User Guide - “SuiteBuilder (Customization) Guide”
Netsuite User Guide - “Advanced PDF/HTML Template Field Reference”
Freemaker API Reference https://freemarker.apache.org/docs/alphaidx.html
Freemarker - Getting Started https://freemarker.apache.org/docs/dgui_quickstart.html
Freemarker - Formatting Dates
Adding Fields to an existing Adv PDF/HTML Form
BFO 1.1.63 User Guide https://bfo.com/products/report/docs/userguide.pdf
BFO API Tags (Reference) https://bfo.com/products/report/docs/tags/
Google Noto Fonts https://www.google.com/get/noto/
RMNSUG LinkedIn Forum
#advancedpdf channel on “netsuiteprofessionals” Slack Forum