Suggested answer

SOSL (Salesforce Object Search Language) performs full-text searches across multiple objects simultaneously. Syntax: FIND {search term} IN ALL FIELDS RETURNING Account(Name, Id), Contact(FirstName, LastName). Clauses: IN: Scope — ALL FIELDS, NAME FIELDS, EMAIL FIELDS, PHONE FIELDS. RETURNING: Specify objects and fields to return (can include WHERE and ORDER BY per object). WITH: Additional filters — WITH DATA CATEGORY, WITH NETWORK, WITH DIVISION, WITH SNIPPET. Results are a List<List<sObject>>. Governor limit: 20 SOSL queries per transaction; 2,000 rows returned per query. Use SOSL for search-box style queries; use SOQL for precise, filtered data retrieval on known objects. SOSL leverages the Salesforce search index (faster for text searches, but not guaranteed real-time).

Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.

Community comments (0)

No comments yet.

Sign in or create a free account to add a comment. Comments are moderated before they appear.

Plain text only, 3–2000 characters. A moderator reviews every comment before it is published.