Now that we have everything in place, let’s use it. If you want to learn more about the heatmap options, take a look at the documentation. For this example, we’re going to center the map on the United States. Then we can iterate over all of them, and put them into our object called testData that then gets loaded on the map. This will return back an array of our ContactGeo objects. Then we’ll make a remote callout to our static method getContactGeos and pass in the account’s Id. We’ll start by loading in all of our javascript requirements and our CSS. Let’s take a look at our controller for our Visualforce page. Heatmap.resource on github Apex Controller If you need more information on creating a static resource, checkout the documentation. I’ve gone ahead and created a single zip that can be uploaded as a static resource (named heatmap) and it will contain all the javascript you need. To make our heatmap, we’ll need to have access to some javascript files. Once you have populated your data correctly, you’ll see that the clean status is marked as “In Sync.” For example, the entire address is in the Mailing Street field and does not show as valid. An important note is that if you have a Developer account, the address is not populated correctly. Now this will show us if our contact’s address is correct. However, to help you see that you have valid data let’s turn on clean rules for Contact Mailing Address and then add the “Clean This Record with ” related list Since Summer ‘16 is already available in all orgs there’s nothing you need to do to make this work with default addresses. You can still use the geocode fields but you'll have to get the data in some other way first. Since writing this article, prospector and Clean are being retired on July 31, 2020.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |