When to use SOQL and SOSL
When to use SOQL:

  • The sObject type is predetermined.
  • Result data needs to be joined.
  • You want to query beyond text, email, or phone fields.
  • The query needs to be run from a trigger.

When to use SOSL:

  • Searches need to occur across multiple types.

Written by 

Salesforce MVP | Lightning Champion | 17x Salesforce Certified | Application Architect | 7x Trailhead Ranger | Techforce Services | Australia

Leave a Reply

Your email address will not be published. Required fields are marked *