Here are the steps containing the Freemarker code to print Sales Order/Invoice items sorted by a custom column field on Advanced PDF Layout:
1. On the Advanced PDF Source Code, find the line that says
<#list record.item as item>
2. Add the Freemarker Built-in "sort" as follows:
<#list record.item?sort_by("custcol_item_type") as item>
3. Upon saving, the newly printed PDF should show the Item sublist in ascending order based on a custom column field.
DISCLAIMER: The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. NetSuite Inc. does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in using their own Web server configurations.
NetSuite Inc. does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or completeness of any data or information relating to the sample code. NetSuite Inc. disclaims all warranties, express or implied, and in particular, disclaims all warranties of merchant-ability, fitness for a particular purpose, and warranties related to the code, or any service or software related thereto.
NetSuite Inc. shall not be liable for any direct, indirect or consequential damages or costs of any type arising out of any action taken by you or others related to the sample code.