When using N/query wondering if anybody knows a sh...
# suitescript
m
When using N/query wondering if anybody knows a shortcut to declaring multiple conditions as part of the create call? Here is how I found when there is a single condition I could return the results as part of
.create
.
Copy code
return query.create({
    type: "customrecord_record_type"
    , columns: [
        {fieldId: "name", alias: "name"}
    ]
    , condition: {
        fieldId: "custrecord_filterfield"
        , operator: query.Operator.ANY_OF
        , values: [filtervalue]
    }
}).run().asMappedResults();
Nevermind I found I can just pass the condition as an array of objects instead of a single object.
s
Do yourself a favor and try SuiteQL
☝️ 3
m
Hmmm. I haven't tried it yet. How well documented is it?
It looks like when just doing an array all the filters are by default OR. So I think I might try SuiteSQL.