Marty Zigman Marty Zigman
Prolecto Labs Accelerator Templates

NetSuite SuiteScript 2.0 Mass Update for Updating Customer Deposit

NetSuite Technical



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:

  1. Learn the NetSuite SuiteScript 2.0 Pattern to Apply Customer Deposits to Invoices
  2. 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.

Marty Zigman

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to set up a conversation.

More Posts - Website - Twitter - Facebook - LinkedIn - YouTube

About Marty Zigman

Marty Zigman

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to set up a conversation.

Biography • Website • X (Twitter) • Facebook • LinkedIn • YouTube

Leave a Reply

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