FreeMarker Custom Values Formatting Now Consistent with Standard Field Formatting
In Advanced PDF/HTML Templates, FreeMarker now formats custom variables the same way that NetSuite formats standard fields. Previously, when a standard field was customized to use a FreeMarker variable (for example, in a math expression), it lost its original standard field formatting. The nsformat_* methods provide consistency in how fields are formatted in both FreeMarker and NetSuite. A user’s or customer’s NetSuite preferences determine default formatting for standard fields and makes it possible for one template to serve the needs of multiple countries.
New
nsformat_*( )
formatting methods are now available to use when editing the template source code. This method formats the specific string, number, date, or amount results in the same format used on a standard NetSuite field. This formatting method extends the current localization possibilities to custom variables, ensuring consistent output.