ANS-0748 · PRINTING, PDF & EMAIL TEMPLATES
How to Display Custom Sales Order Fields in NetSuite Web Fulfillment Emails
Learn how to correctly reference custom sales order body fields within NetSuite's web fulfillment email templates by including a standard field alongside them.
Short answer
To successfully display a custom sales order body field in NetSuite's web fulfillment email, it is necessary to include a reference to a standard sales order field within the same line of code. This ensures the system properly initializes the sales order context, allowing the custom field's value to be retrieved and rendered in the email.
Scenario
A user attempts to include a custom sales order body field in a NetSuite web fulfillment email template but finds that the field's value does not display. This issue arises even when the custom field is correctly defined and populated on the sales order record.
Solution
To ensure custom sales order body fields are correctly displayed in NetSuite web fulfillment emails, it is essential to include a standard sales order field reference alongside the custom field. NetSuite's system requires the context of a standard field to properly read and render custom field values within these email templates. The following code snippet demonstrates the correct syntax, where 'custbody_fulfilment_ship_track_number' is the custom field and 'otherrefnum' is a standard sales order field:
<%getCurrentAttribute('salesorder','custbody_fulfilment_ship_track_number')%><%getCurrentAttribute('salesorder','otherrefnum')%><br>Expert NetSuite Support
Need help with this NetSuite issue?
Printing, PDF & Email Templates consulting and configuration support
