The transaction types will be dynamic.When I execute the map reduce script, all transactions record of netsuite will be deleted.
Asked
Active
Viewed 726 times
-1
-
"all transactions of netsuite will be deleted"...I cannot understand what you are asking – Coldstar Aug 02 '21 at 14:14
-
Transaction record means po,so,credit memo, return authorization,bill,item fulfillment and every transaction records. – user16567833 Aug 02 '21 at 15:53
-
It is certainly possible to start with a transaction and write a script to delete all dependent transactions. That can turn into a bit of an issue with a map/reduce because you have to do it in the correct order and you may have to deal with managing governance. There is not a one size fits all way to do this. The transactions available to delete and their relationships depends on what type of Netsuite account you have and what features you have turned on. It would help if you could be more descriptive about what you are trying to do its context. – bknights Aug 03 '21 at 15:10
1 Answers
0
The Map Reduce could use as the input a transaction search, then in the reduce stage just do a record.delete getting the id and the type from the search.
Make sure to delete the transactions in the correct order as there might be dependencies between the transactions (for example delete all the invoices before deleting the sales orders).

Nat
- 21
- 3