Click here to Skip to main content
15,909,445 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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();
C#
log.debug("Remaining Usage Start", scriptObj.getRemainingUsage());


var requestBody = JSON.parse(context.value);

C#
if (context.isRestarted)
    	{
    		log.debug('MAP for ' + context.key + ' isRestarted', 'YES');
    	}
    	else
    	{
    		log.debug('MAP for ' + context.key + ' isRestarted', 'NO');
    	}



}
Posted
Updated 8-Dec-16 0:05am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900