Depositing Transaction Records in NetSuite
Tags: netsuite, suitetalk • Categories: Web Development
Moving transactions in NetSuite from "Not Deposited" to "Deposited" is not straightforward when using NetSuite SuiteTalk.
You need to ensure that undocumented requirements for each record type are met. After you’ve validated that your records are properly configured, you can include them in a new deposit using the following structure:
ns_deposit = NetSuite::Records::Deposit.new
ns_deposit.payment_list << {
deposit: true,
# internalId of a CashSale, CustomerPayment, CustomerRefund, CustomerDeposit, etc
id: 123,
# the amount is not required if the currency of the payment is the same as the currency
# of the bank account that the deposit is posting to
payment_amount: 100.0
}
ns_deposit.add
Note that you don’t need doc
, type
, or any of the other fields available on the a DepositPayment
item. It’s also important to note that the other fields on the DepositPayment
don’t actually effect how NetSuite handles the referenced transaction record. deposit
, id
, and payment_amount
are the only fields that matter when referencing a NetSuite transaction on a deposit.