To clarify what I think I already know... 1. There...
# suitescript
m
To clarify what I think I already know... 1. There's no way to call a Mass Update Script from another script 2. There appears to be no way to do mass transaction deletes other than with Mass Updates. Is this right? Or is there another path for #2?
d
2. You can call record.delete(options) from client and server scripts
You'd have to call it for each record, which is what Mass Update is doing anyway I believe
m
I was just thinking about that. My thought is that MU is pretty fast. When we're doing a fixit (don't ask) of 300 records... that could be a LONG execution to load each one. With Mass Update I just have a function that uses
nlapiDeleteRecord(recType, recId);
Or would we be not loading - just a scripted search and then loop through the results with record.delete?
d
yeah, you're calling the module's function (
N/record.delete()
), not the delete() function of a loaded record
so you could just loop through a search passing
result.id
to
record.delete()
(and the record
type
) I imagine it's similar with SS1.0, but IDK for sure
m
This is very helpful and enlightening... I have research to do! Thanks!
m
For 300 records I'd just delete in the UI with inline editing