Hey all. I'm working on deploying my first Mass Up...
# suitescript
n
Hey all. I'm working on deploying my first Mass Update script and have gotten stuck. Is this the right channel to ask for some guidance?
If so, here's my context. I'm an Admin working in a sandbox. I've created my Script record and my Script Deployment. The Script Deployment
Applies To
Vendor Bill, the
Status
is set to Released, the Role is set to
Administrator
and I've specified no
Audience
At this point, I'm expecting to see my Mass Update script populate under Lists > Mass Update > Mass Updates > Custom Updates > Vendor Bill
but no dice
I created the Script Record as a Mass Update type
and it's a script in the 1.0 style, if I understand correctly
k
it might help to see your script
n
oh sure, one sec
Copy code
/**
 *  Use SavedSearch results as target list for mass delete.
 * 
 *  NetSuite will loop through each record in your search 
 *  and pass the record type and id for deletion
 *  Try / Catch is useful if you wish to handle potential errors
 * 
 *  Lists > Mass Update > Mass Updates > Custom Updates
 */

function MassDelete(record_type, record_id)
{
    try {
        nlapiDeleteRecord(record_type, record_id)

    } catch (err) {
        var errMessage = err;

        if(err instanceof nlobjError) {
            errMessage = errMessage + ' ' + err.getDetails() + ' ' + 'Failed to Delete ID : ' + record_id;
        }

        nlapiLogExecution('ERROR', 'Error', errMessage);

        return err
    }
}
real simple
or so I thought
k
nothing looks wrong there, let's take a look at your script record
n
my goal is doing bulk delete of records based on Saved Search results
message has been deleted
message has been deleted
b
I would recommend setting the audience
n
K
magic
k
👏
n
thank you. now let me see if i can run it
worked! thanks again