When generating PDF documents in NetSuite using Advanced PDF/HTML Templates, you might notice that the default name of the PDF tab is not always user-friendly or informative. Customizing this name can greatly enhance user experience, especially when handling multiple documents. Here’s a guide on how to change the PDF name on the tab using specific XML content in your advanced PDF template.
Step-by-Step Guide
- Access the Advanced PDF/HTML Template:
- Navigate to Customization > Forms > Advanced PDF/HTML Templates.
- Select the template you wish to edit or create a new one.
- Open the Template for Editing:
- Click Edit next to the desired template.
- Ensure you are in the Source Code view to edit the XML content directly.
- Add the Meta Tag for Custom Title:
- Insert the following XML content at the beginning of your template code. This meta tag will customize the name of the PDF tab based on specific fields in your record.
- Here’s what each part represents:

<metaname=“title”value=“${record.tranid} – ${record.otherrefnum}”/>
- ${record.tranid}: This placeholder will be replaced by the transaction ID of the record.
- ${record.otherrefnum}: This placeholder will be replaced by another reference number associated with the record.
- Save and Test the Template:
- Save your changes by clicking Save or Save and Deploy.
- Generate a PDF using the updated template to ensure the tab title reflects the new naming convention.
Detailed Explanation
- Meta Tag: The
<meta>tag in HTML is used to provide metadata about the HTML document. In the context of a PDF, metadata can include information like the title, author, and subject. By specifying thename="title"attribute, we can set the title of the PDF document tab. - Value Attribute: The
valueattribute of the<meta>tag is set to a combination of fields from your record. The placeholders${record.tranid}and${record.otherrefnum}dynamically pull data from the record being processed to create a meaningful and unique PDF title.