Transaction Search

Nearly all transaction record types use the TransactionSearch record for search. The basic element in this record references the TransactionSearchBasic record, which lists all available search filter fields available in a transaction search.

The TransactionSearch record also lists all search joins available in a transaction search. For details, see the SOAP Schema Browser’s TransactionSearch reference page.

Be aware that the actual search filter fields available will vary depending on the transaction type you are searching against. Not all of the search filter fields defined in TransactionSearchBasic will exist on every single transaction type. For example, the Check transaction type may include search filter fields not available on the Journal Entry type. However, search filters values for both record types will be defined in TransactionSearchBasic.

A TransactionSearchAdvanced request with specified columns returns every tranLine as a record. For example, if a sales order contains 1 item line, search results include up to 3 records, depending on the accounts that are touched. This behavior is the same behavior as transaction search in the UI. By contrast, TransactionSearchBasic, and TransactionSearchAdvanced without specified columns, return the whole transaction record. For example, if a search returns a sales order with 3 item lines, search results consist of one record, with ItemList containing 3 items. These operations return basically the same results as a get() operation.


The Opportunity and the Time Bill records are the only transaction types that have their own search interfaces. For details, see the SOAP Schema Browser’s OpportunitySearch and TimeBillSearch reference pages.

          // the sales order
RecordRef salesOrderRef = new RecordRef();
TransactionSearchBasic tranSearch = new TransactionSearchBasic();
// type is item fulfill
tranSearch.setType( new SearchEnumMultiSelectField( new String [] {RecordType.itemFulfillment.getValue()}, SearchEnumMultiSelectFieldOperator.anyOf));
// created from our sales order
tranSearch.setCreatedFrom( new SearchMultiSelectField( new RecordRef [] { salesOrderRef }, SearchMultiSelectFieldOperator.anyOf));
SearchResult result =; 

          //And the outgoing search SOAP looks like this:
<search xmlns="urn:messages_2017_1.platform.webservices.netsu"> 
<searchRecord xsi:type="ns1:TransactionSearchBasic" xmlns:ns1=""> 
<ns1:createdFrom operator="anyOf" xsi:type="ns2:SearchMultiSelectField" xmlns:ns2=""> 
<ns2:searchValue internalId="873" xsi:type="ns2:RecordRef"/> 
<ns1:type operator="anyOf" xsi:type="ns3:SearchEnumMultiSelectField" xmlns:ns3=""> 
<ns3:searchValue xsi:type="xsd:string">itemFulfillment</ns3:searchValue> 


By default only a record's body fields are returned on a search. Therefore, you must set the bodyFieldsOnly element of the SearchPreferences type to false if you want to also return the information specified on a record's sublist. For general information on searching in SOAP web services, see search.

Usage Notes

The following transaction searches are not supported in SOAP web services:

Sample Code

The following sample returns three records, including one that was modified within two minutes the search was made.

SOAP Request

 <search xmlns="urn:messages_2017_1.platform.webservices.netsu">
 <searchRecord xsi:type="ns9:TransactionSearchBasic" xmlns:ns9="">
 <ns9:lastModifiedDate operator="onOrAfter" xsi:type="ns10:SearchDateField" xmlns:ns10="urn:core_2017_1.platform.webservices.nets">
<ns10:predefinedSearchValue xsi:type="ns11:SearchDate" xmlns:ns11="">today</ns10:predefinedSearchValue>
 <ns9:type operator="anyOf" xsi:type="ns12:SearchEnumMultiSelectField" xmlns:ns12="">
<ns12:searchValue xsi:type="xsd:string">_salesOrder</ns12:searchValue>



          TransactionSearchBasic basic = new TransactionSearchBasic();
SearchEnumMultiSelectField soType = new SearchEnumMultiSelectField();
soType.setSearchValue(new String[1]);
soType.setSearchValue(0, TransactionType.__salesOrder);
SearchDateField todayLastMod = new SearchDateField();
todayLastMod.setOperator(SearchDateFieldOperator.o nOrAfter);
todayLastMod.setPredefinedSearchValue(SearchDate.t oday);


Related Topics

Usage Notes for Transaction Record Types
Multiple Shipping Routes in SOAP Web Services
How to Use the SOAP Web Services Records Help
SOAP Web Services Supported Records
SOAP Schema Browser
SuiteTalk SOAP Web Services Platform Overview

General Notices