We are using NetSuite's Advanced PDF Template for Grouped Invoices to print groups of invoices and need to include an existing custom field (custbody_subscription_name from the invoice header) on each invoice row in the invoice group.
We can add the custom field to the view in the Invoice Group app, but how do we reference the customized field in the PDF template? The template appears to use a hardcoded name 'groupedinvoices_summary' to refer to each group of invoices, but it's unclear how to reference a custom field. Here's a snippet of our customized HTML template with our 'custbody_subscription_name' custom field:
<table style="width: 100%; margin-top: 10px;"><#list groupedinvoices_summary as invoice><#if invoice_index==0>
<thead>
<tr style="background-color: #d3d3d3;">
<td align="center" colspan="4" style="font-weight: bold;border-left: 1px solid; border-top: 1px solid; border-bottom: 1px solid; border-right: 1px solid ">${invoice.custbody_subscription_name@label}</td>
<td align="center" colspan="4" style="font-weight: bold;border-left: 1px solid; border-top: 1px solid; border-bottom: 1px solid; border-right: 1px solid ">${invoice.invoicenum@label}</td>
<td align="center" colspan="3" style="font-weight: bold;border-top: 1px solid; border-bottom: 1px solid; border-right: 1px solid ">${invoice.itemtotal@label}</td>
<td align="center" colspan="3" style="font-weight: bold;border-top: 1px solid; border-bottom: 1px solid; border-right: 1px solid ">${invoice.discounttotal@label}</td>
<td align="center" colspan="3" style="font-weight: bold;border-top: 1px solid; border-bottom: 1px solid; border-right: 1px solid ">${invoice.trantaxtotal@label}</td>
<td align="center" colspan="3" style="font-weight: bold;border-top: 1px solid; border-bottom: 1px solid; border-right: 1px solid ">${invoice.shippingcharge@label}</td>
<td align="center" colspan="3" style="font-weight: bold;border-top: 1px solid; border-bottom: 1px solid; border-right: 1px solid ">${invoice.handlingcharge@label}</td>
<td align="center" colspan="3" style="font-weight: bold;border-top: 1px solid; border-bottom: 1px solid; border-right: 1px solid ">${invoice.fxamount@label}</td>
</tr>
</thead>
</#if><tr>
<td align="left" colspan="4" style="color: #333333;border-left: 1px solid; border-bottom: 1px solid; border-right: 1px solid">${invoice.custbody_subscription_name}</td>
<td align="left" colspan="4" style="color: #333333;border-left: 1px solid; border-bottom: 1px solid; border-right: 1px solid">${invoice.invoicenum}</td>
<td align="center" colspan="3" style="border-bottom: 1px solid; border-right: 1px solid">${invoice.itemtotal}</td>
<td align="center" colspan="3" style="border-bottom: 1px solid; border-right: 1px solid">${invoice.discounttotal}</td>
<td align="center" colspan="3" style="border-bottom: 1px solid; border-right: 1px solid">${invoice.trantaxtotal}</td>
<td align="center" colspan="3" style="border-bottom: 1px solid; border-right: 1px solid">${invoice.shippingcharge}</td>
<td align="center" colspan="3" style="border-bottom: 1px solid; border-right: 1px solid">${invoice.handlingcharge}</td>
<td align="right" colspan="3" style="border-bottom: 1px solid; border-right: 1px solid">${invoice.fxamount}</td>
</tr>
</#list></table>
UPDATE #1: After trying various approaches the main issue is that, apparently, only fields in the default views can be referenced. How do we work around this?