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 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.


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<Account> accountList{get;set;}

public list<Account> accountlistSearched{get;set;}

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

public list<wrpclass> SearchAccountListWithMiles{get;set;}

public list<String> accountpicklistvalue;

public list<String> 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

Akshay Dhiman

Akshay Dhiman

Chief Technical Officer

Extensive experience in System Architecture, Project Management, and Delivery.

Please follow and like us:
Social media & sharing icons powered by UltimatelySocial

Enjoy this blog? Please spread the word :)