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!
more "_funcname is not defined" errors
both nlapiSubmitRecord() and nlapiSendEmail() functions 'cause exceptions... not sure why..
(i also tried commenting out the record.setLineItemValue('item', 'quantity', j, 0) line.. but didn't make any difference)
function uncommitSales() { var filters = new Array(); var columns = new Array(); filters[0] = new nlobjSearchFilter("quantitycommitted",null,"greaterthan",0); filters[1] = new nlobjSearchFilter("quantityshiprecv",null,"equalto",0); filters[2] = new nlobjSearchFilter("enddate",null,"before","01/15/2007"); columns[0] = new nlobjSearchColumn("internalid"); columns[1] = new nlobjSearchColumn("item"); var searchresults = nlapiSearchRecord("salesorder", null, filters, var result = ""; for ( var i = 0; i < Math.min(1, searchresults.length); i++) { var record = nlapiLoadRecord(searchresults[i].getRecordType(), searchresults[i].getId()); for (var j = 1; j < record.lineitems.item.length; j++) { if (record.lineitems.item[j].item_display == searchresults[i].getText('item')) { record.setLineItemValue('item', 'quantity', j, 0) //alert ("found " + i + " = " + j); try { nlapiSubmitRecord(record, true); } catch (e) { alert("submit?: 0