Discussions
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Join us
How to improve Map/Reduce (In)Efficiency on Transaction Lines?
I understand the basic concept of the Map/Reduce script to take all the elements (results) from the Search in the Map stage and process them individually (so that the script actions can be paused / resumed as required by other NetSuite processes).
My particular script is taking a search of multiple transactions, and then multiple (but not all) lines on each transaction.
In this scenario, the Map/Reduce logic does not make sense as the script appears to be loading and saving the transaction for each line result (which is hugely inefficient and slow).
Is there any way to use a Map/Reduce but configure it to 'group' all lines in a transaction into a single action so that the record is only loaded and saved once?