OData 2.0 Query Options

By default, the search query string is used as the substringof value in the $filter system query option.

Required Editions

Available in: both Salesforce Classic and Lightning Experience (not for high-data-volume external objects)

Available in: Developer Edition

Available for an extra cost in: Enterprise, Performance, and Unlimited Editions

In this example, the search query string is Acme.

http://services.example.org/my.svc/Shippers?
$select=CompanyName,Phone,ShipperID&$inlinecount=allpages&
$filter=substringof('Acme',CompanyName)+eq+true+
or+substringof('Acme',Phone)+eq+true&$top=25

OData 2.0 Custom Query Option

We recommend that you set up the OData producer to support free text search expressions with the custom query option. You can then specify the name of the query string parameter in the Custom Query Option for Salesforce Search field on the external data source. In this example, the custom query parameter is doSearch and the search query string is Acme.

http://services.example.org/my.svc/Shippers?
$select=CompanyName,Phone,ShipperID&
$inlinecount=allpages&doSearch=Acme&$top=25

Learn more about OData URI conventions at www.odata.org.