2
votes

Is there any way to get [currency] field from Account table in Netsuite? From record browser both Search Filters and Search Column doesnt included [currency] field. I need to get the [currency] field from bank type account to do some logic. Please help. Thanks.

2

2 Answers

3
votes

It looks like you can't access this field via the Search API but it is available if you load the record.

var record = nlapiLoadRecord('account', accountid);
var currency = record.getFieldValue('currency');
1
votes

You could get the accounts and their currencies used thoughout a specific transaction type. For example: this will get you all the accounts and currencies used on Cash Sales:

var filters = [];
var columns = [];

filters.push(new nlobjSearchFilter('type', null, 'anyof', ['CashSale']));
columns.push(new nlobjSearchColumn('account', null, 'GROUP'));
columns.push(new nlobjSearchColumn('currency', null, 'GROUP'));

results = nlapiSearchRecord('cashsale', null, filters, columns);

I hope this get you closer to a solution.