<@U8M3WV1ST> Yes, actually is the only way to pass...
# suitescript
a
@Morris Yes, actually is the only way to pass anything to a map reduce...
m
thanks!
s
what about using that
cache
object people were talking about a while back, or using custom record as a persistent store?
a
@stalbert I know you love complicate things, I should not used the word "only". Parameters are the only thing global in a Map Reduce across the different stages...that make them ideals for actually passing data from other script to a map reduce...
s
lol. I actually love to simplify - which is why I use TS and NFT. In any case I believe the original question asked if it was the only way so didn't want to lead astray.
a
LOL I want to say something about typescript we are not getting anyway with that topic so better let it be hahaha
m
@stalbert Many moons ago, I attempted using N/cache in map/reduce and learned, as is documented, that the cache in N/cache can be invalidated at any random time which, for the context of which I was using Map/Reduce, made N/cache useless.
The best solution I found was to use script parameters. Script parameters are visible to all stages within Map/Reduce, so, if you can populate the script parameters within your script deployment (ie, at execution time), that's a good option for a sort of "global variable" within map/reduce.
s
@mkachline you mean adding script param values when invoking map/reduce from script, yes? populating script params on the deployment is a static operation. Doing so at some other time (in script) is possible but unsupported/undocumented yes?