Justin Rea
03/10/2025, 4:20 PMCeligo AI
03/10/2025, 4:20 PMAI generated answer (using internal Slack threads):When adding an address to a subcustomer that has no address, you would typically use a POST method if you are creating a new record. However, in the context of NetSuite, you would use the SuiteScript API to add an address to a subcustomer. Here is a sample code snippet based on the conversations:
javascript
var customerRec = record.load({
type: record.Type.CUSTOMER,
id: 'yourCustomerId'
});
var myaddressSubrecord = customerRec.getCurrentSublistSubrecord({
sublistId : "addressbook",
fieldId : "addressbookaddress"
});
// Set the address fields
myaddressSubrecord.setValue({
fieldId: 'addr1',
value: '123 Main St'
});
myaddressSubrecord.setValue({
fieldId: 'city',
value: 'Anytown'
});
myaddressSubrecord.setValue({
fieldId: 'state',
value: 'CA'
});
myaddressSubrecord.setValue({
fieldId: 'zip',
value: '98765'
});
// Commit the changes
customerRec.commitLine({
sublistId: 'addressbook'
});
// Save the record
var customerId = customerRec.save();
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
03/10/2025, 4:21 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.837620676
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.835589
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834858418
Celigo AI
03/10/2025, 4:21 PMCeligo AI
03/10/2025, 4:21 PM