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.
Asked
Active
Viewed 1,813 times
2 Answers
3
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');

michoel
- 3,725
- 2
- 16
- 19
-
This is exactly what I need. You make me like a fool and thousand thanks.. Appreciated it. :) – Ah Son Nov 16 '16 at 04:40
-
@AhSon You are right to expect it to be available via a search. Unfortunately that's the way it goes with NS sometimes - if the straightforward way doesn't work, try the backwards way.. – michoel Nov 16 '16 at 04:45
1
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.

Adolfo Garza
- 2,966
- 12
- 15
-
Clever idea. What do you think the performance of this would be versus getting a list of all the Account internalid values and then loading the Account records individually? – cja Jul 16 '18 at 12:13
-
1Running a search is a lot faster than loading individual records. Here's another way to do it: http://blog.prolecto.com/2018/07/07/netsuite-suitescript-2-0-lookup-hard-to-search-values/ – Adolfo Garza Jul 16 '18 at 14:16
-