Is it possible to have a mass delete script (eithe...
# general
r
Is it possible to have a mass delete script (either via scheduled script or mass update script) delete multiple transaction types out of the same search? I could have sworn it was, but the examples I am finding on YT and Google all make you specify a doc type. I'm guessing I'd have to figure out some SuiteScript to run the scripts specifying each doc type sequentially?
m
With map reduce based on saved search ( with multiple transaction type ) it’s working
r
Technifino has a public bundle that can do this. Bundle ID 251197. Also, ERP Gurus has a bundle that's been around for a while that may work as well for you. Bundle 10232.
s
You can just case out the document types from the one returned in the search to the version a script would need. Then you can reference the type in the script. Conversely just use if statements in the script to convert the document type values.
r
@Roy L thanks for the recommendation, that works great. The only issue I'm running into is that the deletion script seems to be "randomly" (I'm sure it's not random; I'm just not a coder so I don't really know how Map/Reduce works) selecting the records to delete. Which is a problem in my use case because these records are all linked together so they need to be deleted in a certain order. For that reason, I had the search the Techfino bundle references sorted by the order the records need to be deleted. Any ideas on how to get it to respect that?