Currency Rate

After you have created currency records in NetSuite and defined a base currency, you can set up exchange rates between the base currency and foreign currencies to apply to transactions. If you use NetSuite OneWorld and defined a different base currency per subsidiary, set up different exchange rates between each base currency and its foreign currencies. Exchange rates for a base currency apply to all subsidiaries that use the same base currency.

Currency exchange rates are used to convert foreign currencies to base currencies, providing default rates for transactions in currencies other than the base currency.

The currency exchange rate record is available only when the Multiple Currencies feature is enabled.

To access this record in NetSuite, go to Lists > Accounting > Currency Exchange Rates > New.

For help working with this record in the UI, see Currency Exchange Rates.

The internal ID for this record is currencyrate.

See the SuiteScript Records Browser for all internal IDs associated with this record.

Note:

For information about using the SuiteScript Records Browser, see Working with the SuiteScript Records Browser in the NetSuite Help Center.

For information about scripting with this record in SuiteScript, see the following help topics:

Supported Script Types

The currency rate record is scriptable in both client and server SuiteScript.

Supported Functions

When the Multiple Currencies feature is enabled, this record is partially scriptable. It can be created, read, copied, and searched.

When the Multiple Currencies feature is not enabled, this record is not scriptable.

Code Sample

The following code sample shows how to create a currency exchange rate:

            require(["N/record", "N/format"], (record,format) => {
 
    var effectivedate = format.parse({ value : '9/20/2023', type : format.Type.DATE});
 
    let objRecord = record.create({
        type: "currencyrate",
        isDynamic: true
    })
 
    objRecord.setValue({fieldId:'basecurrency', value: 4});  // Setting Base Currency, 4 would be the internal Id of the base currency
    objRecord.setValue({fieldId:'transactioncurrency', value: 3});  // Setting Transaction Currency, 3 would be the internal Id of the transaction currency
    objRecord.setValue({fieldId:'exchangerate', value: 1.08});  // Setting the Exchange Rate
    objRecord.setValue({fieldId:'effectivedate', value: effectivedate});  // Setting the Effective Date
    objRecord.setValue({fieldId:'externalid', value: 'EXT_01'});  // Setting the External Id
   
    objRecord.save({
        enableSourcing: false,
        ignoreMandatoryFields: false
    });
     
}); 

          

General Notices