Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The NetSuite Pro

The NetSuite Pro Logo The NetSuite Pro Logo

The NetSuite Pro Navigation

  • Home
  • About Us
  • Tutorials
    • NetSuite Scripting
    • NetSuite Customization
    • NetSuite Advanced PDF Templates
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Home
  • About Us
  • Tutorials
    • NetSuite Scripting
    • NetSuite Customization
    • NetSuite Advanced PDF Templates
  • Blog
  • Contact Us
Home/ NetSuite Customization Guide/Advanced PDF & HTML Templates in NetSuite

Advanced PDF & HTML Templates in NetSuite

πŸ“ What Are Advanced PDF Templates?

Advanced PDF/HTML Templates let you design custom print and email layouts for NetSuite records.
Instead of relying on standard layouts, you can use FreeMarker markup + HTML/CSS to build professional, branded templates.

They are commonly used for:

  • Invoices
  • Sales Orders & Quotes
  • Packing Slips & Shipping Labels
  • Statements

πŸ”§ Key Features

  • Full control of layout and styling with HTML & CSS.
  • Use FreeMarker syntax to insert dynamic NetSuite fields.
  • Apply conditional logic (e.g., show VAT fields only for EU customers).
  • Support for multi-subsidiary branding (different logos, addresses).
  • Insert custom fields into printed/email forms.

βš™οΈ Steps to Create an Advanced PDF Template

  1. Go to Customization > Forms > Advanced PDF/HTML Templates > New.
  2. Choose a record type (e.g., Invoice).
  3. Either:
    • Start with a blank template, or
    • Customize an existing one.
  4. Use the built-in editor to add HTML, CSS, and FreeMarker code.
  5. Preview the template using sample data.
  6. Assign the template to a custom or standard form.

βœ… Example: Custom Invoice Template

Scenario: You want to create a branded invoice that includes company logo, customer name, line items, and a conditional β€œPaid in Full” stamp.

Code Snippet:

<!DOCTYPE html>
<html>
<head>
  <style>
    body { font-family: Arial, sans-serif; font-size: 12px; }
    .header { text-align: center; }
    .paid { color: green; font-size: 18px; font-weight: bold; }
    table { width: 100%; border-collapse: collapse; margin-top: 20px; }
    th, td { border: 1px solid #ccc; padding: 5px; }
  </style>
</head>
<body>

<div class="header">
  <img src="${companyInformation.logoUrl}" alt="Company Logo" height="50"/>
  <h2>Invoice</h2>
</div>

<p><b>Customer:</b> ${record.entity}</p>
<p><b>Date:</b> ${record.trandate}</p>
<p><b>Invoice #:</b> ${record.tranid}</p>

<table>
  <tr>
    <th>Item</th>
    <th>Quantity</th>
    <th>Rate</th>
    <th>Amount</th>
  </tr>
  <#list record.item as i>
  <tr>
    <td>${i.item}</td>
    <td>${i.quantity}</td>
    <td>${i.rate}</td>
    <td>${i.amount}</td>
  </tr>
  </#list>
</table>

<#if record.total == record.amountpaid>
  <p class="paid">Paid in Full</p>
</#if>

<p><b>Total:</b> ${record.total}</p>
<p><b>Amount Paid:</b> ${record.amountpaid}</p>
<p><b>Balance Due:</b> ${record.balance}</p>

</body>
</html>

πŸ‘‰ This template displays invoice details and conditionally shows β€œPaid in Full” if the balance is zero.


πŸ”— Common FreeMarker Syntax

  • Insert Field β†’ ${record.fieldid}
  • Loop through sublist β†’ <#list record.item as i>
  • If condition β†’ <#if record.total > 1000>High Value</#if>
  • Company Info β†’ ${companyInformation.companyName}, ${companyInformation.logoUrl}

πŸ’‘ Pro Tips & Best Practices

  • Use inline CSS for consistent formatting across browsers.
  • Always preview with sample transactions before deploying.
  • Store logos in the File Cabinet and reference them dynamically.
  • Document custom templates β€” especially if tied to subsidiaries.
  • Keep multiple versions for testing before replacing a live invoice.

πŸ“Œ Key Takeaways

  • Advanced PDF Templates give you full control over NetSuite’s printed and emailed documents.
  • FreeMarker + HTML/CSS allows for dynamic data, loops, and conditions.
  • Always preview and test before assigning to live forms.
  • Combine with custom fields for maximum flexibility.

πŸ‘‰ Next Page: SuiteBuilder vs SuiteScript: When to Use Which

Share
  • Facebook

Leave a ReplyCancel reply

Sidebar

Ask A Question

Stats

  • Questions 6
  • Answers 6
  • Best Answers 0
  • Users 2
  • Popular
  • Answers
  • Rocky

    Issue in running a client script in NetSuite SuiteScript 2.0 ...

    • 1 Answer
  • admin

    How can I send an email with an attachment in ...

    • 1 Answer
  • admin

    How do I avoid SSS_USAGE_LIMIT_EXCEEDED in a Map/Reduce script?

    • 1 Answer
  • admin
    admin added an answer The issue is usually caused by following Wrong script file… September 14, 2025 at 10:33 pm
  • admin
    admin added an answer Steps to send an Invoice PDF by email: define(['N/email', 'N/render',… August 28, 2025 at 3:05 am
  • admin
    admin added an answer This error means your script hit NetSuite’s governance usage limit… August 28, 2025 at 3:02 am

Top Members

Rocky

Rocky

  • 1 Question
  • 21 Points
Begginer
admin

admin

  • 5 Questions
  • 2 Points

Trending Tags

clientscript netsuite scripting suitescript

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

© 2025 The NetSuite Pro. All Rights Reserved