Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
NetSuite has launched SuiteSuccess Wholesale Distribution Edition, in Japan. Please join us the webinar on February 12 that introduces NetSuite solution with demos and case studies for Wholesale Industry.
Register Now
How to fix my Script that updates Customer Addresses?
Hi,
I am trying to update the Address field using suitescript. Below is my aftersubmit script. It is not saving the addressee field. There are no errorrs. Can you please help?
var rec = record.load({
type: record.Type.CUSTOMER,
id: custRec.id,
isDynamic: true
});
var count = rec.getLineCount({
sublistId:'addressbook'});
log.debug('count',count);
for(var i=0;i<=count;i++)
{
var subrec2 = rec.getCurrentSublistSubrecord({
sublistId: 'addressbook',
fieldId: 'addressbookaddress' ,
line: i
});
var cust_addressee= subrec2.getValue({
fieldId: 'addressee'
})
var intIDAddress= subrec2.getValue({
fieldId: 'internalid'
})
log.debug('intIDAddress',subrec2.id);
/* var defaultShipping= subrec2.getValue({
fieldId: 'defaultshipping'
})
log.debug('defaultShipping',defaultShipping); */
subrec2.setValue({