Can someone please explain what the following query does..?
List<List<sObject>> results = [FIND '4155557000' IN Phone FIELDS
RETURNING Contact(Id, Phone, FirstName, LastName),
Lead(Id, Phone, FirstName, LastName), Account(Id, Phone, Name)];
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityThe query will search for the number '4155557000' in the phone field of the Contact,Lead and Account objects. The Returning clause expresses which objects need to be searched, and what fields of any matched records should be returned as results.
The composition and meaning of SOSL is well explained in its documentation