Salesforce™ Google Map Integration

Salesforce™ Google Map Integration

We are Salesforce™ Experts and we channelize our energy by documenting all the industry-specific technical problems we solve in Salesforce™ CRM world. Here I am about to explain one of the Google Maps API with Saleforce.com custom development projects. I was closely involved as a Salesforce™ Developer. At, below I will provide you a brief description of the project what basically it is and how we helped our end client.

Requirements:-

In, this Project Client basically need a system viewer where he can calculate a distance between the source and the other records. The basic agenda of this project to help our end client where they will help their customer and they can identify all the machine from the source of Account. The original idea of the project is that from a single Account record Source we need the ability to produce a list of other accounts. Account records that fall within a certain proximity radius to that account is a list of accounts that result from the search ‘Proximity’ accounts. An account in the system could potentially be a source account. The user initiating the search from the Source account would first need to populate a screen showing various criteria information. Such criteria would include a ‘Radius’ setting we will provide the initial default value but we will need the ability to override. Additional criteria would include two or three custom fields these currently exist on the Account record. It will provide default values for each but we will need the ability to override. It is not mandatory that the list of Proximity accounts display in map form. If the Proximity accounts are displayed in a list, and not on a map, it is important that we can see the distance in miles from each Proximity account to the Source account.

We came with the solution:-

In,this what we acknowledge that from the list of account we can identify certain set of machines from the source to the estimate miles and can find out the list of machines from the source with different cost and it would ease to identify the certain machine from the list of miles and also it can be identified from the last sale day ago which we can filter from all the above source and then click on search. From this, it provides two option:-

1-Generate pdf

2-View Map Generate Pdf:- From this Option Customer after selecting their choices they will click on this option and they will get a detailed report within the Pdf.

View Map:- It provide a viewer to identify all the destination location of the products and analyze the certain destination via this map. Now, with the following screenshots its methodology can be understood as follows:-

1) Search Filter with the various criteria   2) Search Result with the Following Criteria :- 3) From various option it can be identified with the map :-  It can be understood with the following Code Snippets as follows. These are the few components which we deployed to the production.

1. Show All Account on Filter Controller :-

From below code we are able to distinguish how to multi select the option which are available on the filter-

public with sharing class ShowAllAccountOnFilterController {

public String recordID{get;set;}

public Account Sourceaccount{get;set;}

public double Last_Sale_Days_Ago{get;set;}

public list accountList{get;set;}

public list accountlistSearched{get;set;}

public list accountlistSearched1{get;set;} // list will show on map

public list SearchAccountListWithMiles{get;set;}

public list accountpicklistvalue;

public list seletectedaccountpicklistvalue;

public boolean listisempty{get;set;}

public boolean showiflistfilled{get;set;}

public  String headerdata{get;set;}

public string url{get;set;}

public double radiusdis{get;set;}

public String Machines{get;set;}

public String SourceAccountAddress;

public String sourceaddress=”;

public String otherAccountAddress;

public double selectedvalue{get;set;}

At below there is an description of the above model with the ER Diagram

Ajay Dubedi

CEO | Founder
" More than 11 years of industry experience. Responsible for strategy, vision, and project delivery at Cloud Analogy "

This Post Has 11 Comments

  1. Integrating google maps into Salesforce – Starting with description of the Project we have worked upon, there’s an app we created for searching and showing Account’s location on the Map and knowing a route map from one location to another location via some locations(Checkpoints). For the requirement we used Google maps api which is in Javascript format. There are some predefined javascript functions used in the Google map api.

  2. I have been browsing online more than three hours today, yet I never found any interesting article like
    yours. It is pretty worth enough for me. Personally, if all site owners and bloggers made good content as you did, the net will be much more useful than ever before. Ahaa, its fastidious conversation concerning this article here at this web site, I have read all that, so now me also commenting at this place. I couldn’t refrain from commenting.

    Well written!

  3. Since the admin of this web site is working, no hesitation very rapidly it will be well-known, due to its
    feature contents.

  4. Very shortly this web site will be famous among all blogging viewers, due to it’s pleasant posts

  5. Simply desire to say your article is as surprising. The clearness in your
    post is simply great and i caan assume you are
    an expert on this subject. Fine with your permission allow me to grab your RSS feed to
    keep updated with forthcoming post. Thanks
    a million and please continue the enjoyable work.

  6. We are a group of volunteers and starting a new scheme in our community.
    Your website offered us with valuable information to work on.
    You have done an impressive job and our whole community
    will be grateful to you.

  7. You are so awesome! I do not think I have read a single thing like this before.
    So good to find another person with a few original thoughts on this topic.
    Really.. thank you for starting this up. This website is something
    that’s needed on the internet, someone with some originality!

  8. I like looking through a post that can make people think.

    Also, thank you for allowing me too comment!

  9. I like this website very much, Its a real nice berth to read and incur information.

  10. This design is incredible! You most certainly know how to keep a
    reader amused. Between your wit and your videos, I was almost moved to
    start my own blog (well, almost…HaHa!) Excellent
    job. I really enjoyed what you had to say, and more than that, how you presented it.

    Too cool!

  11. This is my first time visit at here and i am truly impressed to read everthing at one place.

Leave a Reply

Close Menu