Discussions
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
UNEXPECTED_ERROR thrown by filter object
I have been testing a script that will be a server-side script. Essentially what it is doing is that it looks up active contracts in a custom table, Customrecord_Contracts. It will use the contract number to search the Sales Order table for all sales orders associated with this contract. The weight from each of these orders is then subtracted from the initial contract balance and the balance will be updated in the contracts table (when I get there).
Anyway the problem occurs with I run the line, "var transsearch=nlapiSearchRecord('salesorder',null,tsfilter,tscolumn). When I replace 'tsfilter' with 'null' the search works, so the problem is obvously in the filter object, "var tsfilter=new nlobjSearchFilter('custcol_contract',null,'is',contractname)". I have tried different operators but still the same error.