Salesforce Geolocation Field

Salesforce’s Geolocation Field is used to identify locations by their latitude and longitude and calculate the distance between them. We can use the geolocation field anywhere the user wants to define a location.

Recently, I worked in a Salesforce company. While working here, I received a task where I needed to enter the office’s defined location under the employee details. This geolocation defines where our office is located. To fulfill this requirement, I used the geolocation Field Type, which is present under the Field and Relationship.

In this Salesforce tutorial, I will explain the geolocation field and how to create a geolocation field in Salesforce Lightning and Classic interfaces.

Geolocation field type in Salesforce

The salesforce geolocation field is defined as a field type that permits the users to identify the location by their latitude and longitude to calculate the distance between the locations.

It is a compound field that adds up org limits as three custom fields: one for latitude, the second for longitude, and the third for internal use. It is not available for external use.

Now, let’s move further and see how to create the geolocation field type in Salesforce Lightning and Salesforce Classic.

Read How to Create Date Time Field Type in Salesforce

How to create a geolocation field type in Salesforce Lightning

Here we are creating the geolocation field type in Salesforce Lightning.  

Here, we are taking an example: we are using the Business Brand object inside the Business Brand object. We want to add the Office Location as a geolocation field.

There is a Cisco company in the USA. In this company, many employees work. There is a need to add the office’s location under all the employees’ details section, which defines the location of the office. This office location is added by simply using the geolocation data type, which is present under the Field and Relationship.

Here are the following steps:

1. Go to the Gear icon –> Click on the Setup option –> Select the Object Manager tab.