Is there a limit on how many values I can enter in...
# suitescript
r
Is there a limit on how many values I can enter in an array while doing the search. For eg filter: custom_name field contains any of [x, y, z]
w
I believe it's a thousand
this 1
e
No limit
Well, there wasn't a few years ago, no idea if that changed
c
it used to be 250 IDs
e
From a NetSuite ticket I had back in 2020;
Thanks for waiting. The documentation for Filter objects doesn't explicitly indicate any limitations for the elements in an AnyOf operator, so there doesn't seem to be any. To test this, created an AnyOf filter with a million element values successfully in my test account.
c
interesting. We used to get a hard cap @ 250 in an anyof and it would fail. Glad its updated.
e
It's
1,000
for an
IN
clause in SuiteQL, and I thought the same was true for
anyof
in a Search Filter
c
@erictgrubaugh are you moving over to SuiteQL exclusively over stuff like saved searches? I've yet to make the switch.
e
We're not making an active effort to convert everything, but for new code we prefer
N/query
over
N/search
💯 2
c
All of my searches are encapsulated so probably wouldn't be too hard to update. Is there a big performance boost or just moving to new stuff? I am honestly curious on this.
e
Nah, not that we've noticed. Performance seems about the same on similar complexities.
The simplicity/readability of
query.runSuiteQL().asMappedResults()
is a significant benefit over the verbosity of a comparable Search
👍 2
r
Thank you everyone.