Discussions

Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Update your Profile with your Support type to get your Support Type badge.
Expand your NetSuite knowledge by joining our Ask A Guru Live sessions. RSVP on this event now.
Don't miss out on our Question of the Week! You only have until tomorrow, October 16, 2025, 2PM ET to comment your answers and earn rewards! Click here for more details.
Uncover the power of data with the Analytics Hub —your ultimate guide to mastering NetSuite Saved Searches and Reports. Simplify the complex and unlock your organization's true potential. Dive into the Analytics Hub now and soar to new heights!
To help you get the most out of your 2025.2 Release Preview account, review the topics outlined in the 2025.2 Release Preview Guide.
Share Your SuiteWorld Experience & Earn a Special Badge!

SSS_TIME_LIMIT_EXCEEDED - 3600 seconds

edited Dec 2, 2019 5:58PM in SuiteCloud / Customization 2 comments

We import a few thousand records of a custom record type each day. Once these records are in our system a scheduled script processes them and categorizes them by selecting an option from list/record field on the record.

I have 4 SSS_TIME_LIMIT_EXCEEDED errors from last night. The script used between 4000-6000 units. Each error says the script ran for 3600 seconds.

Here is my code:

function scheduledMEUpdate(){    var context = nlapiGetContext();   var searchAgain = true;   while(context.getRemainingUsage()>15 && searchAgain){   var MEs = getMEs(); //10   var MEsLen = (MEs != null)?MEs.length:0;   if(MEsLen < 1000) searchAgain = false;//search returns 1000 results... so needs to be triggered multiple times   //update each record:      for(var i=0;i<MEsLen && context.getRemainingUsage()>4;i++){    //if the ME has a GROUP then use GROUP join to get info else USE Item join to get info    var id = MEs[i].getId();    var cols = MEs[i].getAllColumns();    var adPl = MEs[i].getValue(cols[2]);    var itPl = MEs[i].getValue(cols[4]);    if(adPl == ''){     if(itPl != ''){      nlapiSubmitField('customrecord_mexp',id,'custrecord_mexp_prod_line2',itPl);//4      //nlapiLogExecution('audit','INFO ','ME: '+id+' | Item PL: '+itPl);     }    }else{      nlapiSubmitField('customrecord_mexp',id,'custrecord_mexp_prod_line2',adPl);//4     

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!

Leaderboard

Community Whiz

Quarter 4 (Oct-Dec 2025)

This Week's Leaders

This Month's Leaders

All Time Leaders