I need some assistance in the correct way to format this code for a item fulfillment in Netsuite;
<td><#if item.units != null>Units<#else>${tranline.units}</#if></td>
I want the PDF form to show the Units of Measure (i.e. units) and if there is no particular UOM specificied for the item, to say UNITS instead of displaying nothing.
Your example looks correct to me, aside from the values being in the wrong places. In my PDF templates, I do not use NULL, either. Below is how I have a similar item written.
<#if item.units=="">
Units
<#else>
${tranline.units}
</#if>
来源:https://stackoverflow.com/questions/39991278/netsuite-advanced-pdf-html-code-ifelse-statement