Correct answer: A
FIND "Universal Containers" IN ALL FIELDS RETURNING Lead(Id, Name),
Account(Id,Name), Contract(Id, Name)
Explanation
Explanation:
Why A is correct: The requirement involves searching across multiple distinct objects (Leads, Accounts, and Contracts) for a specific text value ("Universal Containers"). This requires a SOSL (Salesforce Object Search Language) query. The correct SOSL syntax uses the FIND clause followed by the search term, an optional IN clause (defaulting to ALL FIELDS if not specified or explicitly stated as IN ALL FIELDS), and a RETURNING clause that specifies the objects and the fields (Id, Name) to retrieve.
Why the other options are incorrect:
B & D: These options attempt to use SOQL (Salesforce Object Query Language) syntax (like FROM Lead, Account... or WHERE Name = ...), which is invalid. SOQL queries can only query one primary object at a time (though you can traverse relationships), and they use SELECT, not FIND. Furthermore, Contracts do not have a Name field; they use a ContractNumber field, meaning a standard SOQL equality check on Name for a Contract would fail.
C: While IN Name Fields restricts the search to name fields only, the prompt asks for leads, accounts, and contracts with the company name "Universal Containers." In Salesforce, Accounts and Leads have a Company field, and SOSL searching across multiple objects for a company name string typically utilizes IN ALL FIELDS or IN Name Fields, but option A correctly provides the standard syntax structure. Wait, let's verify if IN ALL FIELDS or IN Name Fields is typically preferred or if both work—actually, IN ALL FIELDS is standard when searching across multiple objects where field names might differ (e.g., Account Name vs Company vs Contract fields). Let's double-check standard Salesforce exam phrasing for SOSL.
Reference:
Salesforce Object Query Language and Object Search Language (SOQL and SOSL) Guide: SOSL Syntax
Salesforce Developer Guide: RETURNING Clause