How to have global variables in map/reduce scripts...
# suitescript
g
How to have global variables in map/reduce scripts? How to change a global variable inside one stage (e.g. map) and have that change available to a different stage (e.g. summary)?
b
different function invocation dont share the same script context. you cant use global variables to pass state
you can try something like storing your variable in a custom record or field
if you think netsuite wont clear the cache on you, you can try using N/cache
since you are interested in getting values in summary, you might be able to use the summaryContext to get the information you want.