Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Client script - edit sublist that's not visible?
I'm trying to add a new employee to the sales rep assignment sub tab. The issue is, for this particular custom customer form, the sales rep assignment tab is hidden and needs to stay hidden.
I can get the current sales rep in the same form by using
var currentSalesRep = nlapiGetLineItemValue('salesteam','employee',1);
even with the tab being hidden. However, when I try to use
nlapiSelectNewLineItem("salesteam");
nlapiSetCurrentLineItemValue("salesteam", "employee", salesRepId, true, true);
to add a new sales rep, I get the error JS_Exception
TypeError cannot read property 'checkvalid' of null.
If I make the tab visible, the script works fine. Does anyone know if there is a work around or better way to do this? Thanks in advance.