getStandardTransactionCodes
Function Declaration |
|
Type |
Interface function |
Description |
Store the standard transaction code mapping to NetSuite. This function contains information that maps the transaction code from the parsed transactions to the corresponding NetSuite transaction types. |
Returns |
void |
Input Parameters |
StandardTransactionCodeContext |
Example
getStandardTransactionCodes: function (context) {
var tranTypes = ["ACH", "CHECK", "CREDIT", "DEBIT", "DEPOSIT", "FEE", "INTEREST", "PAYMENT", "TRANSFER", "OTHER"];
for (var i = 0; i < tranTypes.length; ++i)
{
var standardTransactionCode = context.output.createNewStandardTransactionCode();
standardTransactionCode.tranCode = tranTypes[i];
standardTransactionCode.tranType = tranTypes[i];
context.output.addStandardTransactionCode({"standardTransactionCode":standardTransactionCode});
log.debug({
title: 'Adding a new standard transaction code',
details: standardTransactionCode
});
}