This file can be downloaded and unzipped to provide example code for a mapping project. This component is not supported by Sage and is provided for educational purposes for partners. Where reference is made to 3rd party script and code libraries you must ensure that you have satisfied the necessary licensing terms and conditions.
The Sage CRM Mapping Component allows users to mark companies, cases, opportunities, and leads on a map in Sage CRM. Users can also view nearby hotels, airports, pubs, and restaurants on the map. The Mapping Component is compatible with Sage CRM versions 2018 R2, 2018 R1, 2017 R3, 2017 R2, 2017 R1, 7.3 SP3, 7.3 SP2, 7.3 SP1, and 7.3.
When configuring the Mapping Component, system administrators can select a map service provider to be used. For example, OpenStreetMap and its contributors, Stamen, Esri, F4map, Komoot, or ViaMichelin.
To use the Mapping Component, the client computers must have Internet access. The component embeds unencrypted content from a remote website, so it doesn’t work on browsers that use SSL.
Installing and configuring the Mapping Component
Before installing the Mapping Component, make sure that your Sage CRM license allows you to use the Component Manager.
Step 1: Enable CLR integration on the Sage CRM database
-
Open SQL Server Management Studio and connect to the SQL Server hosting the Sage CRM database.
-
In Object Explorer, expand the root node, expand Databases, and locate the Sage CRM database. By default, this is CRM.
-
Right-click the Sage CRM database and click New Query.
-
Enter the following SQL query and click Execute:
sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO
-
Select the last two lines in the query and click Execute again:
RECONFIGURE
GO
Step 2: Generate a MapQuest consumer key
The Mapping Component uses a free map search provided by MapQuest. To enable the map search in Sage CRM, you need to create a MapQuest account, generate a consumer key, and then provide that key to the Mapping Component.
-
Set up a MapQuest account at https://developer.mapquest.com/plan_purchase/steps/business_edition/business_edition_free/register.
You’re automatically logged into your new account.
-
Click Manage Keys.
-
Click Create a New Key.
-
In App Name, enter any name.
-
Leave Callback URL blank.
-
Click Create App.
-
Click the name of your app to display its details.
-
Copy the consumer key. You will need it in Step 4 below.
Step 3: Install the Mapping Component
-
Make sure that your Sage CRM license allows you to use the Component Manager.
-
Download the Mapping Component from here.
-
Log on to Sage CRM as a system administrator.
-
Click <My Profile> | Administration | Customization | Component Manager.
-
Under Add Component, browse to select and open the .zip file you downloaded in step 2.
-
Click Upload New Component. The component is added to the Available Components list.
-
In Available Components, select Sage CRM Mapping Component, and click Install Component.
Ensure you select the latest download of the component. If you’ve installed the Mapping Component before, the latest version has a number after the name. For example, MappingComponent(1).zip.
-
Under Apply all changes? select Yes.
WARNING: Do not select the checkbox below this option, as this uninstalls the component. This checkbox does not confirm that you agree to terms and conditions.
-
Click Install Component. If prompted, confirm that you want to install the component.
-
When the installation completes, click Continue.
Step 4: Configure the Mapping Component
In this step, you enable the map search and select the map service provider to be used with the Mapping Component.
-
On the Sage CRM server, open the following folder:
<Sage CRM installation folder>\WWWRoot\CustomPages\xtmp_Maps
The default Sage CRM installation folder is
%ProgramFiles(x86)%\Sage\CRM\CRM
-
Open the settings.js file in a text editor such as Notepad.
-
In the file, locate and edit the following:
var MAP_QUEST_API_KEY = 'CONSUMER KEY';
In this code, replace CONSUMER KEY with the consumer key you obtained from MapQuest.
var mapObj = {
name: "MapTiles",
url: [
In this element, uncomment the URLs of the map service provider you want to use.
You can use only one provider. When switching providers, make sure to comment out the URL of the provider you switch from.
WARNING: Do not uncomment the names of map service providers. If you do so, the Mapping Component won’t work.
-
Save the file.
-
Refresh the browser cache by pressing Ctrl + F5.
After you change the settings.js file, for example, select a different map service provider, every user must refresh their browser cache for your changes to take effect.
The Mapping Component is now ready to use.
Using the Mapping Component
Once you have installed and configured the Mapping Component, the Map tab becomes available for companies, cases, opportunities, and leads.
Specifying locations for entities
Out of the box, Sage CRM database doesn’t contain GPS coordinates for entities. To accurately display a company, case, opportunity, or lead on the map, you must specify its location manually.
-
Click the Search arrow on the top bar and click <Entity>.
-
Search for the entity record and open it.
-
Click the Map tab.
-
Click Search. The address is displayed in the search box and a pin is displayed in the approximate position of the address.
-
Click Change location.
-
Move the pin to the exact location.
-
Click Save location.
Adding a map gadget to the interactive dashboard
-
Create a map gadget and add it to the dashboard:
-
Click My CRM | Dashboard | New Gadget | Create Gadget.
-
Click Web Site.
-
In Web Address, enter the following:
#crm_server#/custompages/xtmp_maps/gadgetredirector.asp?gadgetPath=custompages/xtmp_maps/mapsgadget.asp
-
Click Next.
-
Enter a name for the gadget and click Finish.
-
Create a list gadget and add it to the dashboard:
-
Click New Gadget | Create Gadget.
-
Click List.
-
Select an entity to base your gadget on and click Next.
-
Select the data source to base your gadget on and click Next.
-
Select the columns to display or select Select All.
-
Select a Default Action and click Next.
-
Add a Name and Description for the gadget, and click Finish.
-
Link the list gadget to the map gadget:
-
Click the Links icon on the list gadget.
-
Click New Link.
-
Select sends data to.
-
Select the map gadget in the right-hand drop-down.
-
Select the data that's linked between the gadgets.
-
Click OK and click Close.
Displaying information on a map
-
Click the Search arrow on the top bar and click <Entity>.
-
Search for the entity record and open it.
-
Click the Map tab.
-
Select the entities and amenities that you want to display on the map.
-
Select the radius that you want to view on the map.
-
Click Center Map to return to the active entity.
Removing the Map tab
You can remove the Map tab from Sage CRM. This, however, doesn’t uninstall the Mapping Component.
-
Click <My Profile> | Administration | Customization | Component Manager.
-
Select the Mapping component from the Available Components list.
-
Click Install Component.
-
Select Check this to uninstall the Mapping Component.
-
Click Install component. The Map tab is no longer displayed.