In the past, if you've wanted to geocode (that is, to store the longitude and latitude for) address fields in Salesforce, you've probably had to go to great pains to do so. In fact, in a Salesforce webinar that Kartik Viswanadha and I recently presented, we discussed several techniques for using Asynchronous Apex with callouts to an external web service to perform geocoding. Fortunately, in Summer '16, geocoding has gotten a whole lot easier, at least for Salesforce's standard Address fields.
The new geocoding functionality uses a Data.com feature, but you don’t need to have a Data.com license to use it.
From Setup, enter “Clean Rules”
in the Quick Find box and select it. Review and activate any of the four pre-defined Geocode Clean Rules for:
(Note: this feature is not supported for Person Accounts.)
These predefined rules specify the details of the geocoding action for each of the four standard Address fields. If you select “Clean all records when this rule is activated or saved,” Salesforce will automatically geocode your existing records.
When Salesforce geocodes your address fields, it places the results in the corresponding standard Longitude and Latitude fields. For some reason, Salesforce doesn't make these fields available to be placed on a page layout. However, you can define formula fields that expose the values of the standard Longitude and Latitude fields, and then place your formula fields on the page layout.
With Summer '16, geocoding standard Address fields is now easy and painless, and with this in place, you'll always know where your Accounts, Contacts, and Leads are!