ANS-1666 · PRINTING, PDF & EMAIL TEMPLATES

How to Display Vendor Language on NetSuite Advanced PDFs?

Utilize a custom language field and conditional logic in Advanced PDF/HTML templates to display vendor language accurately, regardless of the user's current language setting.

Short answer

To display vendor language on Advanced PDFs, create a custom language field on the vendor record. Then, use conditional logic in the PDF/HTML template to check for both English and localized values of this custom field, ensuring the correct language is rendered irrespective of the logged-in user's language preference.

Scenario

NetSuite vendors do not natively include a locale field that can be directly sourced for Advanced PDF/HTML templates, unlike customer records. This presents a challenge when attempting to generate documents, such as payment vouchers, in a vendor's preferred language. Furthermore, the display value of a custom language field can vary based on the logged-in user's language settings, requiring a robust solution to ensure consistent output.

Solution

To accommodate different wording per logged-in user language when sourcing the value of a custom language field on Advanced PDF/HTML templates, the following steps should be taken:

  1. Create a custom entity field (e.g., _gs_vendor_language) of type 'List/Record' sourcing the 'Language' list. This field will be added to the vendor record to store the vendor's preferred language.

  2. When referencing this custom field in the Advanced PDF/HTML template, implement conditional logic to check for both the English and localized display values of the language. For example, to check if the vendor's language is French (Canada), the code snippet below demonstrates how to account for both 'French (Canada)' (English user interface) and 'Français (Canada)' (French user interface):

<# if record.entity.custentity_gs_vendor_language == "French (Canada)" || record.entity.custentity_gs_vendor_language == "Français (Canada)">

Expert NetSuite Support

Need help with this NetSuite issue?

Printing, PDF & Email Templates consulting and configuration support

Talk to a consultant