KM
05/05/2026, 12:27 PMCeligo AI
05/05/2026, 12:27 PMAI generated answer (using internal Slack threads):In a Map/Reduce script in SuiteScript, you can pass data from the Map or Reduce stage to the Summary stage using the
context.write method in the Map or Reduce stage and then accessing it in the Summary stage using context.output.
Here's a basic example:
In your Map or Reduce stage, you would use context.write to write data that you want to pass to the Summary stage. For example:
javascript
context.write({
key: 'someKey',
value: 'someValue'
});
Then, in your Summary stage, you can access this data using context.output. You can iterate over the output using the iterator method, like so:
javascript
context.output.iterator().each(function(key, value) {
log.debug('key', key);
log.debug('value', value);
return true;
});
In this example, 'key' and 'value' would be 'someKey' and 'someValue' respectively, as written in the Map or Reduce stage.
Remember, the context.write method is used to pass data from the Map or Reduce stage to the Summary stage, and context.output is used to access that data in the Summary stage.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
05/05/2026, 12:28 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.869567871
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.865783811
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.863586485
Celigo AI
05/05/2026, 12:28 PMAbdul Basit
05/05/2026, 3:45 PM