jkabot
08/13/2018, 8:05 PM// in a suitelet
// salesorderIds is an array of strings
task.create({
taskType: task.TaskType.MAP_REDUCE,
scriptId: 'customscript_dropship_labels_mr',
params: {
custscript_dropship_labels_salesorders: JSON.stringify(salesorderIds)
}
}).submit();
// in the map/reduce getInputData
var input = runtime.getCurrentScript().getParameter({
name: 'custscript_dropship_labels_salesorders'
});
var salesorderIds = JSON.parse(input);