Search Types

Every NetSuite record that supports search has corresponding search and advanced search objects. For example, the SOAP listRel XSD contains a Customer object, as well as its corresponding CustomerSearch, CustomerSearchAdvanced, and CustomerSearchRow search objects.

Search XML Schema Types

The following sections define available search types. Every search field within a search object type belongs to one of these search types.

SearchPreferences

Field Name

XML Schema Type

Req

bodyFieldsOnly

boolean

Y/N

pageSize

int

Y/N

returnSearchColumns

boolean

Y/N

SearchRequest

Field Name

XML Schema Type

Req

Notes

preferences

boolean

Y

 

searchRecord

SearchRecord

Y

 

SearchResult

Field Name

XML Schema Type

Req

Notes

totalRecords

int

N

 

pageSize

int

N

 

totalPages

int

N

 

pageIndex

int

N

 

searchId

string

N

 

status

 

 

 

recordList

platformCore:RecordList

 

 

searchRowList

platformCore:SearchRowList

 

 

SearchStringField

Field Name

XML Schema Type

Req

Notes

operator

platformCoreTyp:
SearchStringFieldOperator (attribute)

Y

Reference to a value in a system list. For more information on available values, see Platform Enumerations.

searchValue

xsd:string

Y

 

SearchBooleanField

Field Name

XML Schema Type

Req

Notes

operator

xsd:boolean

Y

The available values are true or false.

SearchDoubleField

Field Name

XML Schema Type

Req

Notes

operator

platformCoreTyp: SearchDoubleFieldOperator(attribute)

Y

Reference to a value in a system list. For more information on available values, see Platform Enumerations.

searchValue

xsd:double

Y

 

searchValue2

xsd:double

N

If the operator is between or notBetween searchValue2 must be populated.

SearchLongField

Field Name

XML Schema Type

Req

Notes

operator

platformCoreTyp: SearchLongFieldOperator(attribute)

Y

Reference to a value in a system list. For more information on available values, see Platform Enumerations.

searchValue

xsd:long

Y

 

searchValue2

xsd:long

N

If the operator is between or notBetween searchValue2 must be populated.

SearchTextNumberField

Field Name

XML Schema Type

Req

Notes

operator

platformCoreTyp: SearchTextNumberFieldOperator (attribute)

Y

Reference to a value in a system list. For more information on available values, see Platform Enumerations.

searchValue

xsd:string

Y

 

searchValue2

xsd:string

N

If the operator is between or notBetween searchValue2 must be populated.

SearchDateField

Field Name

XML Schema Type

Req

Notes

operator

platformCoreTyp: SearchDate (attribute)

Y

Reference to a value in a system list. For more information on available values, see Platform Enumerations.

predefinedSearchValue

plateformCoreTyp: SearchDate

N

Reference to a value in a system list. For more information on available values, see Platform Enumerations.

searchValue

xsd:dateTime

N

Either predefinedSearchValue or searchValue should be populated.

searchValue2

xsd: dateTime

N

If the operator is between or notBetween searchValue2 must be populated.

SearchMultiSelectField

This search type is used to specify a list of one or more internal IDs that reference other user defined records in the system.

Note:

Note that the maximum number of values that can be specified in a MultiSelectField is 1000.

Field Name

XML Schema Type

Req

Notes

operator

platformCoreTyp: SearchMultiSelectFieldOperator (attribute)

Y

Reference to a value in a system list. For more information on available values, see Platform Enumerations.

searchValue

platformCore: RecordRef

Y

An array of type SearchMultiSelectRefValue.

SearchEnumMultiSelectField

This search type is used to specify a list of one or more system defined constants.

Field Name

XML Schema Type

Req

Notes

operator

platformCoreTyp: SearchEnumMultiSelectFieldOperator (attribute)

Y

Reference to a value in a system list. For more information on available values, see Platform Enumerations.

searchValue

xsd:string

Y

 

Search Custom Field XML Schema Types

The following sections define the available search types for custom fields. Every search field within a search object type belongs to one of these search types.

SearchCustomField

This is an abstract type.

Field Name

XML Schema Type

Req

Notes

id

xsd:string (attribute)

Y

References a unique instance of a custom field

SearchStringCustomField

The SearchStringCustomField type extends the SearchCustomField abstract type.

Field Name

XML Schema Type

Req

Notes

internalId

xsd:string (attribute)

Y

Inherited from the SearchCustomField. Reference a unique instance of a custom field.

operator

platformCoreTyp: SearchStringFieldOperator (attribute)

Y

The type is an enumeration type that restricts the value to a predefined list. For more information on available values, see Platform Enumerations.

searchValue

xsd:string

Y

 

SearchBooleanCustomField

The SearchBooleanCustomField type extends the SearchCustomField abstract type.

Field Name

XML Schema Type

Req

Notes

internalId

xsd:string (attribute)

Y

Inherited from the SearchCustomField. Reference a unique instance of a custom field.

searchValue

xsd: boolean

Y

The type is an enumeration type that restricts the value to true or false.

SearchLongCustomField

The SearchLongCustomField type extends the SearchCustomField abstract type.

Field Name

XML Schema Type

Req

Notes

internalId

xsd:string (attribute)

Y

Inherited from the SearchCustomField. Reference a unique instance of a custom field.

operator

platformCoreTyp: SearchLongFieldOperator (attribute)

Y

The type is an enumeration type that restricts the value to a predefined list. For more information on available values, see Platform Enumerations.

searchValue

xsd:long

Y

 

searchValue2

xsd:long

N

 

SearchDoubleCustomField

The SearchDoubleCustomField type extends the SearchCustomField abstract type.

Field Name

XML Schema Type

Req

Notes

internalId

xsd:string (attribute)

Y

Inherited from the SearchCustomField. Reference a unique instance of a custom field.

operator

platformCoreTyp: SearchDoubleFieldOperator (attribute)

Y

The type is an enumeration type that restricts the value to a predefined list. For more information on available values, see Platform Enumerations.

searchValue

xsd:double

Y

 

searchValue2

xsd:double

N

 

SearchDateCustomField

The SearchDateCustomField type extends the SearchCustomField abstract type.

Field Name

XML Schema Type

Req

Notes

internalId

xsd:string (attribute)

Y

Inherited from the SearchCustomField. Reference a unique instance of a custom field.

operator

platformCoreTyp: SearchDateFieldOperator (attribute)

Y

The type is an enumeration type that restricts the value to a predefined list. For more information on available values, see Platform Enumerations.

predefinedSearchValue

platformCoreTyp: SearchDate

 

 

searchValue

xsd:dateTime

Y

 

searchValue2

xsd:dateTime

Y

 

SearchMultiSelectCustomField

The SearchMultiSelectCustomField type extends the SearchCustomField abstract type.

Field Name

XML Schema Type

Req

Notes

internalId

xsd:string (attribute)

Y

Inherited from the SearchCustomField. Reference a unique instance of a custom field.

operator

platformCoreTyp: SearchMultiSelectFieldOperator (attribute)

Y

The type is an enumeration type that restricts the value to a predefined list. For more information on available values, see Platform Enumerations.

searchValue

ListOrRecordRef

Y

 

SearchEnumMultiSelectCustomField

The SearchEnumMultiSelectCustomField type extends the SearchCustomField abstract type.

Field Name

XML Schema Type

Req

Notes

internalId

xsd:string (attribute)

Y

Inherited from the SearchCustomField. Reference a unique instance of a custom field.

operator

platformCoreTyp: SearchEnumMultiSelectFieldOperator (attribute)

Y

The type is an enumeration type that restricts the value to a predefined list. For more information on available values, see Platform Enumerations.

searchValue

xsd:string

Y

 

SearchCustomFieldList

Field Name

XML Schema Type

Req

Notes

customField

platformCore: SearchCustomField []

Y

 

Search Column XML Schema Types

The following search types support advanced search functionality in SOAP web services.

SearchColumnField

This is an abstract type.

Field Name

XML Schema Type

Req

Notes

customLabel

xsd:string

 

 

SearchColumnBooleanField

The SearchColumnBooleanField type extends the SearchColumnField abstract type.

Field Name

XML Schema Type

Req

Notes

searchValue

xsd:boolean

Y

 

SearchColumnStringField

The SearchColumnStringField type extends the SearchColumnField abstract type.

Field Name

XML Schema Type

Req

Notes

searchValue

xsd:string

Y

 

SearchColumnLongField

The SearchColumnLongField type extends the SearchColumnField abstract type.

Field Name

XML Schema Type

Req

Notes

searchValue

xsd:long

Y

 

SearchColumnTextNumberField

The SearchColumnStringField type extends the SearchColumnField abstract type.

Field Name

XML Schema Type

Req

Notes

searchValue

xsd:string

Y

 

SearchColumnDoubleField

The SearchColumnDoubleField type extends the SearchColumnField abstract type.

Field Name

XML Schema Type

Req

Notes

searchValue

xsd:double

Y

 

SearchColumnDateField

The SearchColumnDateField type extends the SearchColumnField abstract type.

Field Name

XML Schema Type

Req

Notes

searchValue

xsd:dateTime

Y

 

SearchColumnEnumSelectField

The SearchColumnEnumSelectField type extends the SearchColumnField abstract type.

Field Name

XML Schema Type

Req

Notes

searchValue

xsd:string

Y

 

SearchColumnSelectField

The SearchColumnSelectField type extends the SearchColumnField abstract type. This references a single ListOrRecordRef and also requires an internalId attribute to indicate the field name.

Field Name

XML Schema Type

Req

Notes

searchValue

RecordRef

Y

 

Search Column Custom XML Schema Types

The following search types support advanced search functionality in SOAP web services.

SearchColumnCustomField

This is an abstract type.

Field Name

XML Schema Type

Req

Notes

customLabel

xsd:string

 

 

SearchColumnBooleanCustomField

The SearchColumnBooleanField type extends the SearchColumnCustomField abstract type.

Field Name

XML Schema Type

Req

Notes

searchValue

xsd:boolean

Y

 

internalId

xsd:string (attribute)

Y

 

SearchColumnStringCustomField

The SearchColumnStringCustomField type extends the SearchColumnCustomField abstract type.

Field Name

XML Schema Type

Req

Notes

searchValue

xsd:string

Y

 

internalId

xsd:string (attribute)

Y

 

SearchColumnLongCustomField

The SearchColumnLongCustomField type extends the SearchColumnCustomField abstract type.

Field Name

XML Schema Type

Req

Notes

searchValue

xsd:long

Y

 

internalId

xsd:string (attribute)

Y

 

SearchColumnDoubleCustomField

The SearchColumnDoubleCustomField type extends the SearchColumnCustomField abstract type.

Field Name

XML Schema Type

Req

Notes

searchValue

xsd:double

Y

 

internalId

xsd:string (attribute)

Y

 

SearchColumnDateCustomField

The SearchColumnDateCustomField type extends the SearchColumnCustomField abstract type.

Field Name

XML Schema Type

Req

Notes

searchValue

xsd:dateTime

Y

 

internalId

xsd:string (attribute)

Y

 

SearchColumnEnumMultiSelectCustomField

The SearchColumnEnumMultiSelectCustomField type extends the SearchColumnCustomField abstract type.

Field Name

XML Schema Type

Req

Notes

searchValue

xsd:string

Y

 

internalId

xsd:string (attribute)

Y

 

SearchColumnSelectCustomField

The SearchColumnSelectCustomField type extends the SearchColumnCustomField abstract type. This references a single ListOrRecordRef and also requires an internalId attribute to indicate the field name.

Field Name

XML Schema Type

Req

Notes

searchValue

ListOrRecordRef

Y

A single ListOrRecordRef

internalId

xsd:string (attribute)

Y

 

SearchColumnMultiSelectCustomField

The SearchColumnMultiSelectCustomField type extends the SearchColumnCustomField abstract type. This references an array of ListOrRecordRefs.

Field Name

XML Schema Type

Req

Notes

searchValue

ListOrRecordRef[]

Y

 

internalId

xsd:string (attribute)

Y

 

SearchColumnCustomFieldList

The SearchColumnCustomFieldList type extends the SearchColumnCustomField abstract type.

Field Name

XML Schema Type

Req

Notes

customField

SearchColumnCustomField

 

 

Sample Code

SOAP Request — Opportunity Search

Following is an example that contains an excerpt of the SOAP body that illustrates an opportunity search containing several search field types.

          <opportunitySearch>
      <projectedTotal operator="lessThan">
         <searchValue>100000</searchValue>
      </projectedTotal>
      <title operator="contains">
         <searchValue>Enterprise</searchValue>
      </title>
      <createdDateRange operator="between">
         <fromValue>2003-10-02</fromValue>
         <toValue>2003-10-12</toValue>
      </createdDateRange>
      <opportunityStatusList operator="anyOf">
         <searchValue>inProgress</searchValue>
         <searchValue>closedWon</searchValue>
      </opportunityStatusList>
      <customFieldList>
         <customField xsi:type="SearchSelectCustomField" internalId="35" scriptId="cust_SalesEngineer" 
         operator="equals">
            <searchValue>Buddy Williams</searchValue>
         </customField>
         <customField xsi:type="SearchBooleanCustomField" internalId="165" scriptId="cust_hasSalesEngineer" 
         operator="true"/>
         <customField xsi:type="SearchStringCustomField" internalId="322" scriptId="cust_DemoNotes" 
         operator="startsWith">
            <searchValue>CRM</searchValue>
         </customField>
         <customField xsi:type="SearchMultiSelectCustomField" internalId="155" scriptId="cust_ProductAreas" 
         operator="noneOf">
            <searchValue>Inventory</searchValue>
            <searchValue>Warehousing</searchValue>
         </customField><
      </customFieldList> 
</opportunitySearch> 

        

Related Topics

General Notices