O'Reilly logo

The Developer’s Guide to the Force.com Platform by Phil Choi, Andrew Fawcett, Glen Martin, Rick Greenwald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SOSL

One of the things you learned about SOQL is that all queries are based around a single Force Platform object. The Force Platform also offers another language that queries all objects in your organization, Salesforce Object Search Language, or SOSL

SOSL Syntax

The basic syntax for SOQL is as follows:

FIND {<search_term>} IN <search_group> RETURNING <field_spec>

The search_term is the string that is searched for. You can specify one or more strings or variables for this value. You join multiple strings together with an AND, a NOT or an AND NOT. All searches are case-insensitive, unless you use double quotes around the search_term to represent an exact string. You can also use double quotes to search for exact strings with spaces or punctuation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required