Recently added to the JJWDesign Google Maps package v2.1.8, is the base functionality to map a Prospect List (or Target List). This includes a combination of Prospects (Targets), Leads, Contacts and even Users as the legend groupings. The combination is appealing to many users. This is just the start of this mapping type functionality and is expected to be developed further in the future. Mapping of Campaigns is not possible at this time (11/21/2013).
Map a Prospect List by Record ID
A Prospect List (or Target List) can be mapped using the following parameters in your URL. This is the most simple way. All you need is the record id (UUID), which is available in the URL for the Prospect List.
index.php?module=jjwg_Maps&action=map_display&record=[id]
- module: jjwg_Maps
- action: map_display
- record: The ‘id’ field value of the List record (UUID)
Example URL:
index.php?module=jjwg_Maps&action=map_display&list_id=6b19dc32-ff28-0295-bfa9-524b2f23ede6
Add a “Map” link to the Target Lists – List View
You may also decide to add a “Map” link to the Target Lists – List View. This is a bit more difficult to accomplish.
Steps to Add Map Link for Target Lists – List View:
Studio does not allow you to edit Target Lists in SugarCRM CE (v6.5). I’m not certain why. For some reason, I can not get this simple URL into the listing view. I’ll explain the process, but I can’t know if it will work with all versions of SugarCRM. So, in this case, I would highly suggest making a full backup (Files and MySQL) before proceeding.
To enable the Target LIsts in Studio:
Create an empty script/file in modules/ProspectLists/
- New Field -> Data Type “URL”
- Call it the “map” field, and Label as “Map”
- Generate URL (checked)
- Default Value: ./index.php?module=jjwg_Maps&
action=map_markers&list_id={ id} (Or use the full path URL) - Save
Go to List View:
- Pull the “Map (map_c)” field over into the “Default” section for the List View.
- Save and Deploy
You would think that this would work, but it doesn’t display any values on SugarCRM CE. It does create the column in the List View. So, instead, we must use some Custom Code in the List View file to display the URL. This requires a file edit, not readily available in SugarOnDemand instances.
Open the meta data file for the Prospect Lists – List View.
custom/modules/ProspectLists/
File the ‘MAP_C’ array section. Edit to add the ‘custom_code’:
‘customCode’ => ‘<a href=”./index.php?module=jjwg_
That will create the “Map” link. For example:
<a href=”./index.php?module=jjwg_
When you’re done, remove the empty file in modules/ProspectLists/
Thank you Jeff, you’re a Great