Advanced PDF/HTML Templates

The Advanced PDF/HTML Templates feature supports an alternative model for customizing printed and emailed transactions. This model supports more customization capabilities than transaction form layouts, also known as basic layouts. (Basic layouts were previously known as legacy layouts.) Administrators and users with the Advanced PDF/HTML Templates permission can customize printed and emailed transactions. To use advanced templates in your account, see Enabling the Advanced PDF/HTML Templates Feature.

When this feature is enabled, you can associate advanced templates with custom transaction forms, so that these templates are used to format printed and email versions of transactions. See Setting Custom Forms to Use Advanced Templates.

You can use advanced PDF/HTML templates to produce either PDF or HTML output, depending on the settings of your print and email preferences. See Advanced Templates Support for Company Printing Preferences.

Advanced PDF/HTML templates support all transaction and print types supported by basic layouts, including internationalized versions. For a list, see Reviewing Available Advanced Templates.

Standard templates are provided for each supported print type. You can create your own customized templates in a Template Editor that supports current industry standards for HTML-based editing, including rich text editing and HTML markup source editing. You can preview your template as you make changes, and detailed error messages are shown if the template cannot be saved. If required, you can change the script ID of custom templates. See Customizing Advanced Templates in the Template Editor, Source Code Editing to Customize Advanced Templates, Previewing Advanced PDF/HTML Templates, Error Messages in Advanced Templates, and Changing the Script ID of a Custom Template.

You also can use SuiteScript to produce HTML and PDF printed forms that take advantage of advanced template customization capabilities. See Using Advanced Template Formatting Programmatically.

Each printed form that uses an advanced template automatically includes a company logo, based on the image file defined as the Company Logo (Forms) field at Setup > Company > Company Information. For instructions for defining this image file, see Configuring Company Information.

You can use SuiteCloud Development Framework (SDF) to manage advanced PDF/HTML templates as part of file-based customization projects. For information about SDF, see SuiteCloud Development Framework Overview. You can use the Copy to Account feature to copy an individual advanced PDF/HTML template to another of your accounts. Each advanced PDF/HTML template page has a clickable Copy to Account option in the upper right corner. For information about Copy to Account, see Copy to Account Overview.

Important:

To use advanced templates, ensure that the Advanced PDF/HTML Templates feature is enabled. Even when this feature is enabled, no changes are made to basic layouts that are currently in use. However, new enhancements are added exclusively to advanced printing, and Transaction Form PDF Layouts and Transaction Form HTML Layouts will be deprecated in a future release. You are encouraged to use advanced templates and associate them with custom forms.

Advanced PDF/HTML Templates are supported in SuiteCloud Development Framework (SDF). SDF is a development framework that you can use to create SDF SuiteApps, or to customize NetSuite accounts, using an integrated development environment (IDE) on your local computer. SDF projects are file-based and use XML definitions of custom NetSuite objects. For more information, see Custom Object and File Development

Account-Specific Domains in Advanced Printing Templates

You should use URLs that include account-specific domains in PDF templates. Data center-specific URLs found in printing templates are automatically modified to use the appropriate account-specific domain URL for each PDF printout. However, the configuration remains unchanged. You should update all URLs in stored templates to use account-specific domains. For example, you should change a system.eu2.netsuite.com link in your template link to <accountID>.app.netsuite.com, where <accountID> is a variable representing your account ID.

Using Advanced Template Formatting Programmatically

Important:

SuiteScript does not support direct access to the NetSuite UI through the Document Object Model (DOM). You should access the NetSuite UI only by using SuiteScript APIs. For information about using SuiteScript APIs to customize the UI, see SuiteScript 2.x Custom Pages.

SuiteScript supports a template engine object and related methods so you can apply advanced template format capabilities programmatically. For SuiteScript 2.0, see render.TemplateRenderer.

In addition, the SuiteScript function nlapiPrintRecord(type, id, mode, properties) supports the use of advanced templates. If you associate an advanced template with the custom form saved for a transaction and use this API to print the transaction, the advanced template is used to format the printed transaction.

You can use SuiteScript to apply advanced templates to printed records that are not transactions. See Using SuiteScript to Apply Advanced Templates to Non-Transaction Records.

Related Topics

SuiteBuilder (Customization)
SuiteBuilder Overview
Customization Best Practices
Customizing Field Level Help for Standard Fields
Custom Fields
Custom Forms
SuiteBuilder Advanced Templates Reference
Basic Printing Layouts
Custom Records
Record Customization (Beta)
Custom Transactions
Custom Segments
Custom Centers
Deploying Upgraded Forms

General Notices