DEX-403 practice question 31 of 35

Universal Containers wants to deliver purchased containers to remote construction address. In these cases, the customers will supply UC with the coordinates to the location. What type of field should the app builder use to capture this information?

Full set: 291 questions
Answer options
A: Number
B: Geo location Correct answer
C: Text
D: External Lookup
Correct Answer:
B. Geo location
Explanation

The Geolocation custom field is specifically designed to store location information as a pair of latitude and longitude coordinates. This field type is the most appropriate choice as it not only captures the required data in a structured format but also enables location-based functionality, such as calculating distances between two points using SOQL queries with the DISTANCE function. Using separate Number fields or a single Text field would be less efficient and would not provide these built-in capabilities.

Why Incorrect

A. Number: A Number field can only store a single numerical value. Capturing coordinates would require two separate Number fields (one for latitude, one for longitude), which is less efficient and lacks native location functionality.
C. Text: A Text field would store the coordinates as an unstructured string. This makes the data difficult to validate and use in calculations or with mapping features without custom parsing logic.
D. External Lookup: An External Lookup is a relationship field used to link a Salesforce record to a record in an external system. It is not used for storing coordinate data directly.

References

1. Salesforce Help, Custom Field Types: "Geolocation: Allows users to specify a location by its latitude and longitude. Can be used to calculate distance. Available in API version 30.0 and later." This document explicitly defines the purpose of the Geolocation field type.

2. Salesforce Developer Documentation, Compound Fields: "Some field types are compound fields, which are a grouping of multiple elements. An example is the Geolocation field type, which has a latitude and a longitude." This reference clarifies the structure of the Geolocation field.

3. SOQL and SOSL Reference, GEOLOCATION: "Use the GEOLOCATION function in a WHERE or ORDER BY clause in a SOQL query to calculate the distance between two location values." This highlights the key functional advantage of using the Geolocation field type for distance-based logic, which is relevant for delivery scenarios.

Scroll to Top