Adding and Removing Fields in Advanced Templates

You can see the fields available to include on an advanced template by reviewing the template in the template editor. You can add and remove fields as needed, and also add currency symbols in front of fields, by following the steps in the following procedures:

Note:

Sublists displayed in the field selector are dimmed and appear for reference only. You cannot add sublists to a template from the field selector. Instead, you must edit the markup source to add a sublist. In addition, you can reference fields on a sublist only at the first level. Referencing sublists at the second level is not supported, with the exception of addresses. For more information about adding sublists to a template, see Source Code Editing in the Template Editor.

Adding a Field to an Advanced Template

You use the Fields selector to add a field to an advanced template.

To add a field to an advanced template:

  1. Go to Customization > Forms > Advanced PDF/HTML Templates and click Customize or Edit for the advanced template.

  2. Position the cursor in the location of the template editor where you want to add a field.

  3. On the New Element toolbar, click the Fields button to display a Fields selector, which lists all fields available to be added to the template.

    Advanced PDF/HTML Template Fields list The list of available fields
    • The Fields selector lists all printable fields and sublists that are available to include on a template. The list of available fields is based on the features that are enabled in your account. For a complete list of fields and sublists, see SuiteBuilder Advanced Templates Reference.

    • Subrecords are not supported, with the exception of address records.

    • Fields and sublists are listed alphabetically and grouped by record name. The data type and the ID are also shown. Each record can be collapsed or expanded to show the fields available. To add a sublist to a template, you edit the markup source to add a sublist. In addition, with the exception of address records, you can reference fields on a sublist only at the first level. Referencing sublists at the second level is not supported. For more information about adding sublists to a template, see Source Code Editing in the Template Editor

    • The selector has a search capability so you can quickly find the field you need. Enter part of the field label in the selector’s Search field to narrow the list of displayed fields.

  4. If you want the field label to be displayed in the template along with the field value, check Include Label in the Fields selector.

  5. To add multiple fields, use the mouse to separate the fields.

  6. When you have finished adding fields, click the Close button.

    The field are shown on the template. If you point to the label, the FreeMarker identifier for the field appears:

    Advanced PDF/HTML field hover example
Important:

You can enter FreeMarker syntax to add a field or label to an advanced template rather than using the selector, if you prefer. With the exception of address subrecords (as of 2019.2), the selector does not include subrecord fields. You must use FreeMarker syntax to add non—address subrecord fields. For information about this syntax, see Syntax for Advanced Template Fields.

With the appropriate permission, you can include address subrecord fields in advanced templates, as well as reference fields and labels, by using FreeMarker syntax.

Adding Address Subrecord Fields to Advanced Templates

Advanced PDF/HTML Templates directly support the address subrecord. For the address subrecord, you can:

  • Use the field selector to directly select subrecord address fields, like City and Street, when you customize advanced PDF printing templates

  • Select any custom fields created on the address

  • Use text formatting (font, font size, color) to control the layout and appearance of the address in printed content

  • Base template logic on address fields (for example, you can use template logic to determine output based on city, state, or zip code)

  • Use available address fields to translate addresses, and then print the translated labels of individual address fields

Address fields available in UI:

Advanced PDF/HTML Templates Fields list with shipping address fields outlined in red.

Adding a Currency Symbol to an Advanced Template Field

You can use a FreeMarker expression to add a currency symbol on an advanced template.

To add a currency symbol to an advanced template:

  1. In the template editor, position the cursor in front of the field that represents a currency amount.

  2. Enter ${‌record.currencysymbol} in front of the field label shown on the template:

    Sample code for adding a currency symbol.

Removing a Currency Symbol from an Advanced Template Field

You can use the a FreeMarker expression to remove a currency symbol from an advanced template, such as a check.

Use the remove currency format: ${nsformat_number(number|string)}. For more information, see FreeMarker Formatting Method.

Removing a Field from an Advanced Template

There can be some fields on a template that are not required by your organization.

To remove a field from an advanced template, select the field and press Delete.

For example, if you do not want sales orders to include the company name and address, you could delete ${‌companyInformation.companyname} and ${‌companyInformation.addressText}. Note that this example also results in the deletion of the company logo.

Related Topics

WYSIWYG Editing in the Template Editor
Template Editor Toolbar
Adding and Formatting Text in Advanced Templates
Adding Tables to Advanced Templates
Including Images in Advanced Templates

General Notices