Discussions
SuiteWorld is the largest annual gathering of the NetSuite community! It will be held in Las Vegas on October 6-9, 2025. Our customers and partners look forward to SuiteWorld every year as a place to hear the latest from NetSuite, get hands-on learning, and connect with each other. Register now!
Now, you can stay up-to-date with the latest discussions, helpful tips, and important announcements, all delivered straight to your inbox. Whether you’re looking to catch up on what you missed or just want a quick overview, our email digest has you covered. To learn more and to subscribe, click here.
Cannot find function getLineItemCount in object nlobjRecord
Here is my setup.
I am running a user event scripts that pass parameters: newrecord (nlapiGetNewRecord()) and oldrecord (nlapiGetOldRecord()) to a scheduled script.
In scheduled script, I am able to retrieved these parameters but the problem is I can't seem to use functions like 'getLineItemCount' to these retrieved parameters.
newrecord = nlapiGetContext().getSetting('SCRIPT', 'custscript_newrecord');
oldrecord = nlapiGetContext().getSetting('SCRIPT', 'custscript_newrecord');
var newrecord_itemcount = newrecord.getLineItemCount('item'); ---> this is getting the error "Cannot find function getLineItemCount in object nlobjRecord"