Mike works for EnableIT SugarUK, an award winning SugarCRM EMEA Gold Partner based in Ipswich, UK and as well as being the primary wordsmith on their blog has been a contributing author on CRMOutsiders since earlier this year. Following recent changes within the SugarCRM camp as to what content will be appearing on the SugarCRM Developer Blog and CRMOutsiders, he finds himself now also posting within the walls of Developer Blog. Following on with the trend of his SugarCRM Tip of the Day articles on CRMOutsiders where he previously posted useful tips on how to get that little bit more from your SugarCRM system, he will now be posting those “How Tos” to the developer blog instead, leaving his CRMOutsiders posts to be more CRM Market based, rather than focussing specifically on SugarCRM.
OK, so here’s your starter. Have you ever wanted to create functionality within your SugarCRM system to be able to see (on a tab within a record) where your customer is located? If so, then read on…
I will be using Google Maps to provide the location maps in this tip, however, it only requires a simple replacement of the relevant code with the search string from your favourite on-line map provider to get the same functionality.
In the SugarCRM Studio, you will need to create a field which will be added to your DetailView layout (preferably in a separate Maps tab to save it loading every time you look at the account details).
Go to the Accounts module and click on Fields.
Click on Add Field and in the Data Type drop-down, select IFrame>
Enter the Field Name as something like maps with a Display Label of something like Location Map
In the Default Value use the search string for your map provider.
For Google Maps this is
You will now need to customise the string to automatically look up the address of the Account whose record you are currently in.
To do this, move your cursor to the section in the search string where the ACCOUNT_ADDRESS is required and then put the tick (if it isn’t already there) in the Generate URL check-box.
In the drop-down list, select billing_address_postalcode and click on Insert Field.
Your Default Value should now read
I recommend that you put an IFrame Height of 400 to give a decent enough map size to see the location properly.
Once you have saved the field away, simply add it to the correct location on your DetailView for the Account module (you don’t need it on the EditView because it’s a dynamically created field with no user-definable content) to get the Account’s location displaying (subject to there being a valid Postal/Zip code in the Account’s address details.
This is a very useful customisation if your sales team/consultants etc. need to be able to quickly see where that meeting they are attending is being held. As it is pulling Google Maps directly into your SugarCRM system, you have full access to the different map types (road, satellite etc.).