I have created a custom Currency Record, and a single record for every currency in the system (cannot save a new record with same currency). For invoices, I need to source fields from this custom record based on the currency on the invoice.
For example if my invoice is in USD then I need to pull the "Bank Account #" field from the custom currency record where "Currency Name" field is "USD". I would assume I need to do a search and then pull this value, but I do not know the syntax for this with freemarker.
With Suitescript, I would have:
var currencyRecord;
var currency = nlapiGetFieldValue('currency');
var filters = new Array();
var columns = new Array();
filters[0] = new nlobjSearchFilter('custrecord_nco_currency_name', null, 'is', currency);
columns[0] = new nlobjSearchColumn('custrecord_bank_acct_num');
columns[1] = new nlobjSearchColumn('custrecord_nco_currency_name');
var currencyRecord = nlapiSearchRecord('customrecord_nco_currency_symbol', null, filters, columns);