Discussions
Streamline Invoice Processing with AI-Powered Automation
Use AI-Driven Insights for Faster, Better Planning and Forecasting
Searching Checkbox fields?
I'm having a problem running a search that includes filters on fields that are checkboxes. It looks to me that the search is completely ignoring the checkbox filters. Example:
function testPortlet(portlet) {
portlet.setTitle('title');
var filters = new Array();
filters[0] = new nlobjSearchFilter( 'name', null, 'equalTo', '11580', null);
filters[1] = new nlobjSearchFilter('memorized',null,'is','Yes',null);
filters[2] = new nlobjSearchFilter('mainline',null,'is','Yes',null);
var columns = new Array();
columns[0] = new nlobjSearchColumn('internalid');
columns[1] = new nlobjSearchColumn('memorized');
columns[2] = new nlobjSearchColumn('mainline');
var searchresults = nlapiSearchRecord('cashsale', null, filters, columns);
portlet.writeLine("Results: "+searchresults.length,null,0);
for ( var i = 0; searchresults != null && i < searchresults.length; i++ )