Showing posts from March, 2019

How To Overcome Script Execution Time Exceeded Error in Schedule script 2.0?

The disadvantage of scheduled suitescript 2.0 is that yield script functionality which is there in 1.0 has been taken away. Yield script had a great advantage of being able to resume the script from the point it stopped when time or usage limit exceeded. As netsuite solution provider we provide a Workaround in schedule script 2.0 to overcome time exceeded error is to monitor the time taken to process the script. inIf it reaches near the time limit of 3600s after which script errors out, schedule script can be called again by netsuite customization passing the point at which it needs to resume. For eg: if you are processing 100k records and script is able to process only 50k after 55 mins, then script can be rescheduled by passing the internalid of record from which script needs to process. This internalid is passed in the script parameter. Example code: var startTime = new Date().getTime(); for(var i=0;i<search.length;i++) { var endTime = new Date().getTime();