Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
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); }