Discussions
JS_EXCEPTION TypeError 'checkvalid' is null or not an object
Hi,
trying to insert a line to a sublist after field changed. When use 'list' as the list type for the sublist, upon changing field value, NetSuite throws back "JS_EXCEPTION TypeError 'checkvalid' is null or not an object" error.
Please advise. Thanks.
Here is the code:
function beforeload(type, name)
{
var tab = form.addTab('custpage_subtab', 'My Tab');
var sublist = form.addSubList('custpage_sublist', 'list', 'Time Entries', 'custpage_subtab');
sublist.addField('internalid', 'text', 'Employee Time ID');
}
function fieldchanged(type, name, linenum)
{
nlapiSelectNewLineItem('custpage_sublist');
nlapiSetCurrentLineItemValue('custpage_sublist', 'internalid', 'INTERANLID', false, true);
nlapiCommitLineItem('custpage_sublist');
}