ian.ns
09/11/2017, 1:03 AMfunction pushAddressToCustomer(customerId, newAddress){
var customer = record.load({
type: record.Type.CUSTOMER,
id: CUSTOMER_BIGJOE_RENTAL
});
var addressList = customer.getValue({
fieldId: 'custentity_ship_to_customers'
});
//newAddress is an id
addressList.push(newAddress);
customer.setValue({
fieldId: 'custentity_ship_to_customers',
values: addressList
});
log.debug({
title: 'result',
details: shipToCustomer
});
}