function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
lowteklowtek 

search multiple objects

Hi All,

 

I have 3 objects (address, city, state) under table Contacts and I want to be able to search on them

just like how the SOSL is doing.

 

 

 address             city             state

-------------------------------------------

1 wilshire          los angeles      CA

624 s grand      los angeles      CA

1 wilshire          austin              TX

 

 

If I search for '1 wilshire CA' It should display 1 record. 

 

Is this possible for SOQL? Or should I use SOSL instead? What should be the PHP code and query to display the results using PHP.

 

 

Thanks in advance. 

SfdcBlueFishSfdcBlueFish

Hai,

 

      SOQL  Uses Query()  Call , which is used to query the records from single object.

 

      SOSL  Uses Search() Call , Which is Used to search the records from multiple objects.

 

 But in your case your having 

 

              Address, city, State lookup relation on Contact.So You can perform search on contact object.

 

      You can use Query( )  call for your requirement.

 

 

            Haribabu

           Force.com certified Developer