Setting Valid Search Values

Prior to the 2008.2 endpoint, if you performed a search that included an invalid search enum filter value, you would generally still get records returned in your search. For example, if you performed a search for all customers with the Country enum search value set to "United States" (rather than the supported enum value _unitedStates), you would still get results from your search. Although the value "United States" was not recognized, you continued to get customer records. Note, however, the search results returned ALL customers in the system, since the value “United States” was invalid.

Starting with the 2008.2 endpoint, instead of ignoring any invalid search enum values, and still returning search results, NetSuite now returns 0 records and a no-match warning. Therefore, when setting search values, be sure to use the values defined in the schema.

The following is an example of what is now returned if invalid values are specified:

          <platformCore:searchResult
xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
<platformCore:status isSuccess="true">
<platformCore:statusDetail type="WARN">
<platformCore:code>WARNING</platformCore:code>
<platformCore:message>The field country's enum value <United States> is
invalid for this search.</platformCore:message>
</platformCore:statusDetail>
</platformCore:status>
<platformCore:totalRecords>0</platformCore:totalRecords>
<platformCore:totalPages>0</platformCore:totalPages>
<platformCore:searchId>WEBSERVICES_MSTRWLF_10212008563721605896842316_60315faa132ad</platformCore:searchId>
<platformCore:searchRowList/> 

        

Related Topics

General Notices