``` arrayOfIds.forEach(function (id, position,...
# suitescript
n
Copy code
arrayOfIds.forEach(function (id, position, array) {
        var filter = searchModule.createFilter({
            name: "internalid",
            operator: "is",
            values: id,
        });
        filterArray.push(filter);
        if (position !== array.length - 1) {
            filterArray.push("OR");
        }
    });
Here is my pitiful attempt to add the OR condition to the Filters for a Search I am creating. This doesn't work with an error,
{"type":"error.SuiteScriptError","name":"WRONG_PARAMETER_TYPE","message":"Wrong parameter type: filters[1] is expected as Filter. ","stack":["createError(N/error)","afterSubmit(/SuiteScript.js:69)","createError(N/error)"],"cause":{"name":"WRONG_PARAMETER_TYPE","message":"Wrong parameter type: filters[1] is expected as Filter. "},"id":"","notifyOff":false,"userFacing":true}
How do you set the OR condition?