Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Salesforce Certified Platform Developer II (PDII) · Salesforce
Select 2 answers.
This question asks for 2 answers, but our data marks only 1. Compare with the community discussion below for the full answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
While it may seem that including DISTANCE in the SELECT clause (as in Option B) lets you "get the distance" as a return value, the core supported use cases in SOQL for these functions are for filtering and ordering.
A: To filter results based on distance from a latitude and longitude → You can use WHERE clauses to filter records based on distance. B: To get the distance results from a latitude and longitude → The DISTANCE function returns the calculated distance in miles or kilometers.
Filter and order