Does anyone know why I can't create a filter like this, and add it to a loaded search's filters? How can I fix this, because the exact same filter is present in a search in NetSuite. it comes up with an error that this name cannot be used as a filter (assuming it's because it's a related record)
var batchIdFilter = search.createFilter({
name: 'custrecord_pmt_transaction.custrecord_batch',
operator: 'anyof',
values: [
batchId
]
});