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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Update: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
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