Salesforce Platform Developer I (legacy) — Question 223
What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts that have the company name "Universal Containers"?
Answer options
- A. SELECT Lead.Id, Lead.Name, Account.Id, Account.Name, Contact.Id, Contact.Name FROM Lead, Account, Contact WHERE CompanyName = ‘Universal Containers’
- B. FIND ‘Universal Containers’ IN Name Fields RETURNING lead(id, name), account (id, name), contact(id, name)
- C. FIND ‘Universal Containers’ IN CompanyName Fields RETURNING lead(id, name), account (id, name), contact(id, name)
- D. SELECT lead(id, name), account (id, name), contact(id, name) FROM Lead, Account, Contact WHERE Name = ‘Universal Containers’
Correct answer: B
Explanation
Option B is correct because it specifically searches for 'Universal Containers' in the appropriate fields and returns the required Ids and Names of Leads, Accounts, and Contacts. Option A incorrectly uses 'CompanyName' instead of targeting the relevant fields, while Option C incorrectly identifies the field to search in. Option D also misuses 'Name' instead of the correct field for filtering by company name.