I have a script that does a recalc on a sublist (c...
# suitescript
p
I have a script that does a recalc on a sublist (custom record) that is in a transaction whenever a line it added via inline. The recalc takes the value and updates a field on the transaction. Script works great but I know need to have this work retroactively - so that previous entries are recalculated. What is the best way to achieve this?
s
By work retroactively you mean you need to run something to go modify all the old records that have already been modified and missed your recalc when it happened? Sounds like a map/reduce to me.
p
Correct.
s
Create search to find transactions that need to be modified (getInput), group the results together, if needed (map), process the transaction as a whole (reduce) would be initial thought.
p
I'll give it a shot. Thanks.