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
Saurabh BhandariSaurabh Bhandari 

Does SOSL supports SOQL relationship queries.

I want to know that can we use SOSL with SOQL.
In Salesforce documentation I have found the statement that "If your org has relationship queries enabled, SOSL supports SOQL relationship queries."
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl.htm
I am new to Salesforce.
Best Answer chosen by Saurabh Bhandari
Khan AnasKhan Anas (Salesforce Developers) 
Hi Saurabh,

Greetings to you!

SOSL doesn't support relationship query the way SOQL supports. So, you need to fetch records separately. Please refer to the below links which might help you further.

https://salesforce.stackexchange.com/questions/48187/can-sosl-retrieve-child-objects-from-the-result-set-of-parent-objects

https://salesforce.stackexchange.com/questions/213425/performing-a-relationship-query-in-a-sosl-query

https://salesforce.stackexchange.com/questions/5179/relationships-in-sosl/5181

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas