Discussions
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.