ANS-0673 · SUITESCRIPT DEVELOPMENT
How to Correctly Filter SuiteScript Searches by Entity or Internal ID?
SuiteScript search filters on `entity` and `internalid` fields require `anyof` or `noneof` operators, as `equalTo` and `is` do not function as expected.
Short answer
When creating SuiteScript searches, `nlobjSearchFilters` on `entity` and `internalid` columns do not work with `equalTo`, `notEqualTo`, or `is` operators. To bypass this limitation, replace these filters with `anyof` and/or `noneof` operators to ensure successful filtering by entity or internal ID.
Scenario
When developing SuiteScript searches, developers may encounter an issue where standard `nlobjSearchFilters` using operators such as `equalTo`, `notEqualTo`, or `is` fail to produce expected results when applied to the `entity` or `internalid` columns. This behavior can lead to incorrect or incomplete search outcomes, despite the filter syntax appearing correct.
Solution
To bypass the limitation where nlobjSearchFilters on the entity and internalid columns do not work with equalTo, notEqualTo, or is operators, replace these filters with anyof and/or noneof.
Expert NetSuite Support
Need help with this NetSuite issue?
SuiteScript Development consulting and configuration support
