dah97765
dah97765

Reputation: 687

Does NetSuite load custom sublists when a record is being printed through freemarker / advanced pdf templates?

I am a NetSuite newbie, so I apologize in advance if this has a simple answer that I do not see.

We have a custom record type that among other things, has a field indicating the list/record (invoice or credit memo) that a particular custom record is related to. Using this, I have a saved search sublist on the invoice record.

When this invoice is being printed / emailed using an advanced template, I can't seem to be able to find this sublist using freemarker syntax (I can access the normal item sublist just fine). I have also tried to make this custom record type a child / parent relationship with the invoice, but i get the same result.

Based on this SuiteAnswer and the NS help article on freemarker, it looks like it is possible.

When I load an invoice record in the UI and append &xml=t to the URL, I can see the normal items sublist, but I do not see any other sublist available.

Is there something I need to do to make a custom sublist exposed to the template engine?

Upvotes: 1

Views: 2160

Answers (1)

tzvi
tzvi

Reputation: 511

You'll need to find the internal id of the sublist. Right click on the title of the sublist and select 'Inspect Element'. You'll notice a repeated string in the html similar to customsublist1.

Once you have that you should be able to access the line items using normal Freemarker sequence syntax.

<#list record.customsublist1 as item>
  ${item.field1}
<#/list>

Upvotes: 2

Related Questions