Discussions
Searching with the OR operator
How do I perform searches with an operator other than a simple AND?
Most of our searches contain a mix of both NetSuite and custom fields with an OR somewhere in the mix. Here is a typical customer search that we can perform through the NetSuite UI:
Inactive = false AND
isPerson = false AND //in the UI it isIndividual not isPerson
custentity_dc_active = false AND
(custentity_dc2 = true OR
custentity_dc = true)
But how can I perform this search pragmatically? I've not been able to find out how to do this through either SuiteScript or SuiteTalk. This is basic search functionality. Right now I'm having to pull data out through ODBC and perform SQL statements outside of NetSuite. Of course ODBC is read-only and I need the ability to write back data to NetSuite.