When loading existing criteria from saved search using
getFilterExpression unexpected error is thrown if
isnotempty operators are used as criteria and are passed as parameter to function
This is documented in Defect 244249.
Steps to reproduce:
- Lists > Relationships > Vendor > Search
Criteria: Comments is empty
Comments is not empty
- Log into debugger
- Run script attached below
Unexpected error is thrown.
No error is shown; whole filter expression is cloned to new search.
var search = nlapiLoadSearch('vendor', 'customsearch_test');var filterExpr = search.getFilterExpression();var search2 = nlapiCreateSearch('vendor');search2.setFilterExpression(filterExpr);var debugger_placeholder = 0;
Construct filter expression manually with third element "null" in array as following:
var filterExpr = [ ["notes", "isempty", null], "OR", ["notes", "isnotempty", null] ];