Latitude and Longitude values are important to display a marker on map. These fields are by default available on Account, Contact and Lead objects. However did you ever noticed, values for Latitude and Longitude are not getting populated even if you added correct address. Yes, that’s correct. So why these fields are there? what’s their use? We can simply create new custom fields and use Google Map API to populate right. Hang on, your questions are correct but you don’t need to build any custom logic to populate these fields.
Ok, So how to do this? Like other rules, Salesforce have the set of rules to achieve this. These rules are called as “Data Integration Rules“.
What are Data Integration Rules?
These rules are useful to keep your data up-to-date, there can be multiple rules depending upon different data related services, but by default, in each org, there are 4 data integration rules present, but they are in disabled state.
To enable these services, you need to follow the steps:
- From Setup menu, search for “Data Integration Rules” in quick find box.
- You will get the list of 4 rules as shown below screenshot, each are related to populating GeoCodes for respective address fields.
- Open the integration rule and click on Activate button. Here I have already activated for Lead object.
- You can set triggers, workflows off by setting checkboxes off while the batch update is happening in background due to this rule.
- As soon as you check “Update all records” checkbox and activate the rule, it will take some time to populate GeoCode values based upon number of records you having for particular object.
Its quite old functionality and available since long time, but due to lack of this information to me, for one of my project in past, I implemented custom integration with Google Map API to populate GeoCodes based on address fields. It should not happen with you guys.