Exchange rate between two currencies via suitscript

Method used to return the exchange rate between two currencies based on a certain date. The Currency Exchange Rate record itself is not a scriptable record. Use the module N/currency. Only base currencies can be converted. The target must be a base currency in your NetSuite account.  If the date is not given the latest rate will be taken. Date is optional.


var rate = currency.exchangeRate({
    source: 'CAD',
    target: 'USD',
    date: new Date('7/28/2015')
});


        

Leave a comment

Your email address will not be published. Required fields are marked *