Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Filtering creditmemo search on status not working
Related to my other post, I'm doing a search to find open creditmemo records on a billing account, but my filter on status isn't working. If I add the filter, I get 0 rows returned. If I remove the filter and add the status column to the results, it clearly shows that it matches my filter.
var billingAccountFilter = search.createFilter({ name: "billingaccount", operator: search.Operator.IS, values: "512" }); var statusFilter = search.createFilter({ name: "status", operator: search.Operator.IS, values: "open" }); // var openCreditsSearch = search.create({ type: search.Type.CREDIT_MEMO, filters: [billingAccountFilter, statusFilter]}); var openCreditsSearch = search.create({ type: search.Type.CREDIT_MEMO, filters: [billingAccountFilter], columns: ["status"]}); var results = openCreditsSearch.run().getRange(0, 1000); return results; [ { "recordType": "creditmemo", "id": "2784", "values": { "status": [ { "value": "open", "text": "Open" } ] } }, { "recordType": "creditmemo", "id": "2784", "values": { "status": [ { "value": "open", "text": "Open" } ] } }, { "recordType": "creditmemo", "id": "2784", "values": { "status": [ { "value": "open", "text": 0