The best practice with NetSuite in regards to record deletion is generally to inactivate the record and avoid actual deletion. There are times when circumstances do justify the deletion of records. If there are more than several dozen records, it can be a time consuming and tedious series of clicks to delete manually. You can easily perform a mass delete by leveraging the mass update feature. This approach is simple by taking the complexity out of the code that might have been written and places control into the hands of the user. When the user sets up their mass update, they can control, using the saved search as criteria, which records to operate on. There is also a chance to preview the list of records before executing the update. Once the user is comfortable with the list they can perform the update. NetSuite will then loop through each record in the list and pass the record type and id to the custom script. This approach takes only a single line of code.
Step 1: Create a Mass Update SuiteScript that looks like this:
Step 2: Register your script in NetSuite:
Step 3: Execute your mass delete by going to the mass update screen and look under Custom Updates.
Your list of script deployments will be listed by record type. The rest of the mass update process has not changed.