Loading
Extend Salesforce with Clicks, Not Code
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          GEOLOCATION

          GEOLOCATION

          Returns a geolocation based on the provided latitude and longitude. Must be used with the DISTANCE function.

          Use

          GEOLOCATION(latitude, longitude) and replace latitude and longitude with the corresponding geolocation, numerical code values.

          Tips

          • The GEOLOCATION function returns a location data type that can be used only by, and must be used with, the DISTANCE function. The GEOLOCATION function doesn’t work on its own.
          Example: Distance Between a Custom Geolocation Field and Fixed Coordinates
          Example: Distance Between a Custom Geolocation Field and Fixed Coordinates

          DISTANCE(warehouse_location__c, GEOLOCATION(37.775,-122.418), 'km')

          This formula returns the distance, in kilometers, between the warehouse and the known latitude and longitude 37.775°, -122.418° (San Francisco).

           
          Loading
          Salesforce Help | Article