0% found this document useful (0 votes)
24 views7 pages

SOQL&SOSL

This document compares SOQL and SOSL, two types of queries in Salesforce. SOQL is used to query data from a single object, requires specifying fields, and returns precise results. SOSL allows searching across objects, automatically includes all searchable fields, and returns ranked results based on relevance. While SOQL is better for precise data retrieval, SOSL is more suitable for broad, text-based searches across multiple objects.

Uploaded by

Mahesh Babu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views7 pages

SOQL&SOSL

This document compares SOQL and SOSL, two types of queries in Salesforce. SOQL is used to query data from a single object, requires specifying fields, and returns precise results. SOSL allows searching across objects, automatically includes all searchable fields, and returns ranked results based on relevance. While SOQL is better for precise data retrieval, SOSL is more suitable for broad, text-based searches across multiple objects.

Uploaded by

Mahesh Babu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

@utkarsh-infosys

SOQL & SOSL


Salesforce Developer

@Utkarsh
SOQL & SOSL
@utkarsh-infosys

SOQL
SELECT Name, AccountNumber FROM
Account WHERE Industry =
'Technology'

SOSL
FIND {Cloud} IN ALL FIELDS
RETURNING Account, Contact

#Quote #Programming #sfdc #SOSL #SOQL


SOQL & SOSL
@utkarsh-infosys

SOQL SOSL

Queries records of a Searches across


single object. multiple objects in a
single query.
Requires explicit field Automatically searches
specification. all searchable fields.

Limited wildcard Extensive wildcard


support (e.g., LIKE support (e.g., FIND
'ABC%'). {ABC*}).

#Quote #Programming #sfdc #SOSL #SOQL


SOQL & SOSL
@utkarsh-infosys

SOQL SOSL

Uses specific conditions Supports a global


for each field. search term with
conditions.
Results are not ranked Results are ranked by
by relevance. relevance.

Ideal for precise data Best for broad, text-


retrieval. based searches.

#Quote #Programming #sfdc #SOSL #SOQL


SOQL & SOSL
@utkarsh-infosys

SOQL SOSL

Supports aggregate Generally not used for


functions (e.g., COUNT()). aggregating data.

Follows a structured Follows a more flexible


SELECT-FROM-WHERE and natural language
format. syntax.

Offers fine-grained Provides less control but


control over queries. is more user-friendly.

#Quote #Programming #sfdc #SOSL #SOQL


SOQL & SOSL
@utkarsh-infosys

Try out !

Retrieve Contacts associated with


Accounts starting with 'A,' linked
to Opportunities in 'Closed Won'
stage, with primary Users having
the role 'Manager' and last login
before January 1, 2023.
#SalesforceChallenge

#Quote #Programming #sfdc #SOSL #SOQL


"Referral appreciated. DM for details. Thanks!"

linkedin.com/in/utkarsh-infosys

"Hire me. DM for


qualifications”

You might also like