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 ...

Get The Developer’s Guide to the Force.com Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.