You can't use a "global" object in a map/reduce be...
# suitescript
c
You can't use a "global" object in a map/reduce because it is global to that script run only. Reduce(s) runs in parallel so its not going to have access to whatever the other parallel run object values are hence the use of N/cache. You CAN use a global object in client scripts since the object will exist for the lifetime of that client. N/cache is what you want to use on serverside if you need a "global" cache. You just provide it a cache name and a means of populating the cache if the value isn't there or should the cache expire (plus whatever else it may need).