having a hard time creating a saved search via ss ...
# suitescript
i
having a hard time creating a saved search via ss 1.0, specifically having an issue when trying to filter on a system notes field, if I exclude that it works fine but as soon as I add the filter for field i get no results even though there are entries for that field. filters[2] in the code below is the one I am having issues with. Any suggestions?
Copy code
var filters = new Array();
filters[0] = new nlobjSearchFilter('internalid', null, 'is', tranid);
filters[1] = new nlobjSearchFilter('mainline', null, 'is', 'T');
filters[2] = new nlobjSearchFilter('field', 'systemnotes', 'anyOf', ['custbody_field1234']);
filters[3] = new nlobjSearchFilter('newvalue', 'systemnotes', 'is', employeeid);
b
save the search in the ui first
the load it in script so you can inspect the filters
the value you are using for the filter is invalid
i
i have the search in ui that mimics the same, how do i inspect the filters in suitescript?
nlapiLogExecution('DEBUG', 'filters', JSON.stringify(loadedSearch.filters));
i
Thank You! This extension is super useful. Found the issue, looks like the internal id on the systemnotes field had to be in ALL CAPS.