Marc
05/16/2026, 5:29 PMCeligo AI
05/16/2026, 5:29 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems that there are a few ways to mass delete addresses in NetSuite: 1. Saved Search and Online Edit: You can create a saved search that lists the addresses you want to delete. Then, use the online edit function to delete these records in bulk. However, this method might not be feasible if you have a large number of addresses to delete. 2. SuiteScript: You can write a SuiteScript to delete the addresses. Here is a sample script provided in the conversation:
javascript
// Delete Addresses
var Rcustomer = record.load({type: record.Type.CUSTOMER,id: _custid,isDynamic: true});
var line_count = Rcustomer.getLineCount({sublistId: 'addressbook'}) - 1;
var _changed = false;
for (kk=line_count;kk>-1;--kk) {
Rcustomer.selectLine({sublistId: 'addressbook',line: kk});
var Raddress = Rcustomer.getCurrentSublistSubrecord({
sublistId: "addressbook",
fieldId: "addressbookaddress"
});
var _city=Raddress.getValue({fieldId: 'city'});
Rcustomer.removeLine({sublistId: 'addressbook',line: kk,ignoreRecalc: true});
_changed = true;
}
if (_changed == true)
Rcustomer.save();
This script loads a customer record, iterates over the addressbook sublist, and removes each line. If any changes were made, it saves the customer record.
3. Custom Record and Script: Another method is to create a custom record, upload the internal IDs of the addresses you want to delete into it, and then write a script to delete the addresses based on the custom record.
Remember to always test these methods in a sandbox environment before applying them to your live data.
******
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
05/16/2026, 5:29 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.842590392
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84149158
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.838806152
Celigo AI
05/16/2026, 5:29 PM