I am creating a print out for Invoice using advanced pdf. I'm trying to get a value of a custom field in the "Tax code" record which is related to the field 'Tax code' in the sublist 'Item'. I tried with ${item.taxcode.customfield}, but in the print out, I have an error
Exception during template merging.com.netledger.templates.TemplateServiceException: Exception during template merging.java.lang.NullPointerExceptionPlease contact your administrator.
Is there another way to manipulate my case and make it work ?
<table class="total" style="width: 100%; margin-top: 10px;" border="2">
<#list record.item as item><#if item_index==0>
<tr>
<th colspan="5" line-height="150%" style="font-weight: bold;background-color: rgb(255, 255, 255);padding: 4x 2px;">Tax Code Message</th>
</tr>
<tr>
<td ><#if item.taxcode?contains("VAT:")><#assign taxcode>${item.taxcode?replace("VAT:","")}</#assign>${taxcode}<br/>${item.taxcode.customfield}</#if></td>
<td ></td>
<td ></td>
</tr>
<tr>
<td ></td>
<td ></td>
<td ></td>
</tr>
</#if></#list>
</table>
Thanks!