Sometimes having a quick code template can make learning easier. In this case, NetSuite’s customer deposit record cannot be updated via CSV uploads. Thus, we may need to use mass update technology to do so.
SuiteScript 2.0 Mass Update Code Snippet
Here is a simple code snippet to help you update customer deposit records using NetSuite SuiteScript 2.0.
/** * @NApiVersion 2.x * @NScriptType MassUpdateScript * */ /* * * Read records from the Customer Deposit and sets the payment method * */ define(['N/record'], function(record) { function each(params) { var funcName = "mts_MU_customer_deposit_paymethod" + params.type + " " + params.id; var PAYMENT_METHOD_CASH = 11; try { var CDEP = record.load({type: params.type, id: params.id}); CDEP.setValue("paymentmethod",PAYMENT_METHOD_CASH); var id = CDEP.save(); log.audit(funcName, "Record Processed. Customer Deposit updated: " + id); } catch (e) { log.error(funcName, e); } } return { each: each }; } );
See other Customer Deposit Scripts and Get Help
I have written about other Customer Deposit scripts. These may be helpful to you:
- Learn the NetSuite SuiteScript 2.0 Pattern to Apply Customer Deposits to Invoices
- Use NetSuite SuiteScript to Automate Posting Customer Deposits to Invoices
If you need help developing SuiteScript programs for your NetSuite account, let’s have a conversation.