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!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Search Filter Problem
Hi All,
I'm having a problem with a search filter that i create in a suitelet. I'm basically creating a dynamic search for specific items. For simplicity here, I've hard coded these filter values. I'm trying to retrieve multiple rows of item data based on the filter. I can retrieve a single value, no problem. The problem is when i try to use an operator such as "contains" or "anyof". In the code snippet below, i use "anyof" and get the error - UNEXPECTED_ERROR. When i use "contains", i only get one row - I'm expecting 2.
function getComboItem(request, response) { var itemIds = new Array(); var filters = new Array(); itemIds[0] = 'DS-CH40'; itemIds[1] = 'DS-CH30'; filters[0] = new nlobjSearchFilter ('itemid', null, 'anyof', itemIds, null ); var columns = new Array(); columns[0] = new nlobjSearchColumn('itemid'); columns[1] = new nlobjSearchColumn('storedisplayname'); columns[2] = new nlobjSearchColumn('price'); columns[3] = new nlobjSearchColumn('urlcomponent'); columns[4] = new nlobjSearchColumn('custitem_drilldownlargeimage1'); columns[5] = new nlobjSearchColumn('custitem_drilldownthumb1'); columns[6] = new nlobjSearchColumn('internalid'); var searchResults = nlapiSearchRecord('item', null, filters, columns); } 0