Including Fields from NetSuite Search Results in Advanced Templates

NetSuite search result columns can be accessed in payment files using the <single_result_keyword>.<column_id> notation.

The following search results can be used in custom payment file advanced templates by adding the corresponding keywords:

Search Result

Sequence Keyword

Single Result Keyword

Payments

payments

payment

Entities

entities

entity

Entity Banks

ebanks

ebank

Transactions

transactions

transaction

Credits

creditsHash

credit_line

Note:

The sequence keyword is only intended to be part of a list command. To access the search result columns, use the single result keywords.

Payments

Entities

Entity Banks

Transactions

Example

Sample payments, entities, and entity banks:

Block diagrams showing examples of values for payments, entities, and entity banks.

Template

          #OUTPUT START#
<#list payments as payment>
   <#assign entity = entities[payment_index] >
   <#assign ebank = ebanks[payment_index] >
***
Amount: ${‌payment.amount}
Address: ${‌entity.billaddress1}
Bank Num: ${ebank. custrecord_2663_entity_bank_no}
***
</#list>
#OUTPUT END# 

        

Note that the variable names for single payment, single entity, and single entity bank use the single result keyword.

Output

Printed output of the previous code sample.

Credits

Example

Template

          #OUTPUT START#
<#list payments as payment>
   <#list creditsHash[payment.internalid] as credit_line>
   ***
   Amount of Credits applied: ${credit_line.foreignAmount}
   Ref No: ${credit_line.tranid}
   ***
   </#list>
</#list>
#OUTPUT END# 

        

Output

          #OUTPUT START#
***
Amount of Credits applied: 100
Ref No: 111
***
***
Amount of Credits applied: 70
Ref No: 122
***
#OUTPUT END# 

        

Related Topics

General Notices