I am trying to bulk delete all the inactivated bin...
# general
r
I am trying to bulk delete all the inactivated bins in the system. I did not see any such option under mass updates or using saved search inline editing. Please advise if there is another option to achieve this as I have hundreds of such records to be deleted.
d
function deleteRecords(rec_type, rec_id) {
try {
nlapiDeleteRecord(rec_type, rec_id);
} catch (err) {
nlapiLogExecution('ERROR','Record Error:',rec_type + ' id ' + rec_id + ' ' + err.message);
}
}
👍 1
❤️ 1
Create a new mass update script with the above as the content. Deploy with "Applies to" set to bin.
Not sure whether Netsuite ever complains if there are related transactions connected to bins.
The above can be used to delete most record types, so needless to say, use with care!
r
Thanks Dominic for this, much appreciated 🙂