Salesforce Certified Platform Developer II — Question 253
How can the DISTANCE and GEOLOCATION functions be used in SOQL queries? (Choose two.)
Answer options
- A. To filter results based on distance from a latitude and longitude
- B. To get the distance results from a latitude and longitude
- C. To order results by distance from a latitude or longitude
- D. To group results in distance ranges from a latitude and longitude
Correct answer: A, C
Explanation
Options A and C are correct because the DISTANCE function allows for filtering results based on proximity to specified coordinates and can also be used to sort results by distance. Options B and D are incorrect as the DISTANCE function does not return distance directly nor does it group results into ranges.