3

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)];
3

The 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.