Hello,
Can anyone explain how system will recall the script in MAP/REDUCE script, after returning the search results from GetInputdata() i am able to get 1000 units in MAP stage, how do i get more usage in MAP stage.
This comes under Netsuite Suitescript 2.0
Thanks,
Ganapathi
What I have tried:
function getInputData() {
var JSONObj = scriptObj.getParameter({
name: 'custscript_sw_jsondata_mapreduce_para'
});
var requestBody = JSON.parse(JSONObj);
return requestBody;
}
function map(context) {
var scriptObj = runtime.getCurrentScript();
log.debug("Remaining Usage Start", scriptObj.getRemainingUsage());
var requestBody = JSON.parse(context.value);
if (context.isRestarted)
{
log.debug('MAP for ' + context.key + ' isRestarted', 'YES');
}
else
{
log.debug('MAP for ' + context.key + ' isRestarted', 'NO');
}
}