I'm importing 1000 orders at a time (in Sandbox). ...
# suitescript
s
I'm importing 1000 orders at a time (in Sandbox). Because I'm testing, I need to delete the orders and reload them. Is there's a script to do it ?
m
Create a custom mass update script, deploy it against the record type that you want to delete, then you’ll see it listed as a custom mass update within the standard mass update screen. The simplest mass update might look like this:
Copy code
/**
 * @NApiVersion 2.1
 * @NScriptType MassUpdateScript
 * @NModuleScope Public
 */
define(['N/log', 'N/record'], function(log, record) {
    function each(params) {
        record.delete({
            type: params.type,
            id: params.id
        });
    }

    return {
        each: each
    };
});
s
yup! that'll do it