Using the Mapping Component with On-Premise Sage CRM

The Sage CRM Blog

Articles of general interest about Sage CRM, the community, add-ons and general news!

Using the Mapping Component with On-Premise Sage CRM

  • Comments 19
  • Likes

Updated: 06 June 2018

About the Mapping Component

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.

In this blog post:

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

  1. Open SQL Server Management Studio and connect to the SQL Server hosting the Sage CRM database.

  2. In Object Explorer, expand the root node, expand Databases, and locate the Sage CRM database. By default, this is CRM.

  3. Right-click the Sage CRM database and click New Query.

  4. Enter the following SQL query and click Execute:

    sp_configure 'clr enabled', 1

  5. Select the last two lines in the query and click Execute again:


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.

  1. Set up a MapQuest account at
    You’re automatically logged into your new account.

  2. Click Manage Keys.

  3. Click Create a New Key.

  4. In App Name, enter any name.

  5. Leave Callback URL blank.

  6. Click Create App.

  7. Click the name of your app to display its details.

  8. Copy the consumer key. You will need it in Step 4 below.

Step 3: Install the Mapping Component

  1. Make sure that your Sage CRM license allows you to use the Component Manager.

  2. Download the Mapping Component from

  3. Log on to Sage CRM as a system administrator.

  4. Click <My Profile> | Administration | Customization | Component Manager.

  5. Under Add Component, browse to select and open the .zip file you downloaded in step 2.

  6. Click Upload New Component. The component is added to the Available Components list.

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

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

  9. Click Install Component. If prompted, confirm that you want to install the component.

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

  1. On the Sage CRM server, open the following folder:
    <Sage CRM installation folder>\WWWRoot\CustomPages\xtmp_Maps

    The default Sage CRM installation folder is

  2. Open the settings.js file in a text editor such as Notepad.

  3. In the file, locate and edit the following:

    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.

  4. Save the file.

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

  1. Click the Search arrow on the top bar and click <Entity>.

  2. Search for the entity record and open it.

  3. Click the Map tab.

  4. Click Search. The address is displayed in the search box and a pin is displayed in the approximate position of the address.

  5. Click Change location.

  6. Move the pin to the exact location.

  7. Click Save location.

Adding a map gadget to the interactive dashboard

  1. Create a map gadget and add it to the dashboard:

    1. Click My CRM | Dashboard | New Gadget | Create Gadget.

    2. Click Web Site.

    3. In Web Address, enter the following:


    4. Click Next.

    5. Enter a name for the gadget and click Finish.

  2. Create a list gadget and add it to the dashboard:

    1. Click New Gadget | Create Gadget.

    2. Click List.

    3. Select an entity to base your gadget on and click Next.

    4. Select the data source to base your gadget on and click Next.

    5. Select the columns to display or select Select All.

    6. Select a Default Action and click Next.

    7. Add a Name and Description for the gadget, and click Finish.

  3. Link the list gadget to the map gadget:

    1. Click the Links icon on the list gadget.

    2. Click New Link.

    3. Select sends data to.

    4. Select the map gadget in the right-hand drop-down.

    5. Select the data that's linked between the gadgets.

    6. Click OK and click Close.

Displaying information on a map

  1. Click the Search arrow on the top bar and click <Entity>.

  2. Search for the entity record and open it.

  3. Click the Map tab.

  4. Select the entities and amenities that you want to display on the map.

  5. Select the radius that you want to view on the map.

    • Entities are displayed on the map for the selected radius only and are limited by distance.

    • Only active and in progress entities are displayed.

    • Amenities are displayed on the map with unlimited distance.

    • Only 30 pins of each type are displayed at once even if there are more than 30 relevant pins. These are chosen randomly.

    • Click a pin on the map to display more information about the relevant entity or amenity.

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

  1. Click <My Profile> | Administration | Customization | Component Manager.

  2. Select the Mapping component from the Available Components list.

  3. Click Install Component.

  4. Select Check this to uninstall the Mapping Component.  

  5. Click Install component. The Map tab is no longer displayed.

  • The mapping component is not recognizing any addresses.  I'm getting the error "your search for XXX did not match any locations.  Displaying map for CITY instead" for legitimate addresses.  Is there a troubleshooting guide?

  • Hi Debbie,

    Could you post sample address you searched for?  Unfortunately we don't have any troubleshooting guide for this component yet, personally I'm always using Developer Tools in Google Chrome.

  • We are on 7.3a, I've installed the Mapping Tool as above and altered the MapsTab.asp to include the postcode on both lead and company tabs, but I still cant get the Company Map Tab to work correctly. When I click the tab the search box is empty, when I then click Change Location, the address that appears is the first address I searched for from the Lead map tab, if I change this and put an address in, it saves the pin, if I then select another Company to Map it shows the Map from the previous Company, I then click Change Location to enter a new address and it shows the address from the first Lead again.

    The Lead map tab is working perfectly, displaying Leads in the correct place.

  • Hi David - please can you tell me how you added to include postcode in lookup.  We are using 7.3sp2 and currently it wont look up postcode and it doesn't recognise County, when county is removed and we manually enter the postcode it works!  Would you mind sharing how you changed the file to include postcode?  many thanks in advance, Julie

  • Hi Julie,

    If you follow the guide in the link below:

    Entering the highlighted yellow, in the Company section of the mapstab.asp file in \Sage\CRM\CRM\WWWRoot\CustomPages\xtmp_Maps\

    Then this:

    params.addr_postcode = CRM.getContextInfo("Lead","lead_CompanyPostCode");

    in the Leads lookup section.

    Does it currently work for you and save maps against addresses, for both Leads and Companies?



  • I have been having issues, even when doing the steps suggested. For some clients the maps still don't show up, for others the search function and pin aren't showing up!

  • This post was updated on 11/11/2016 to include information about enabling CLR and to combine information from other blog posts.

  • So this mapping component used to work for us but now we're getting a blank map with no images.  In the debug console we're getting messages like...

    GET 404 (Not Found)

    GET 404 (Not Found)

    When I browse out to the url it gives me "{"message":"Account over limit."}"

    I've registered for the MapQuest developer key and updated the MapsTab.js file with my consumer key but still no worky.  Anyone else seeing this or know how to fix it?  Thanks.

  • Brad

    I haven't tried the mapping component lately, but based on recent painful experience with js files, you will need to empty your browser cache to make sure the new page is loaded. It might be worth doing a view source to see if the correct code is loaded in the mapping page.


  • Ha Ha.  I know what you mean Tom.  That was actually the first thing I did was empty the cache and do a hard refresh.  I'm actually working with someone from MapQuest to hopefully help troubleshoot this issue.  Definitely seems more like a MapBox issue because it's coming back with that "account over limit" json message, but i'm obviously not over my limit because it's never worked :-)  thanks Tom.

  • Well I did find out that apparently MapBox is not part of MapQuest.  Apparently it's just using the MapQuest consumer key to search for an address but it's using MapBox to display the map.  in the url "${z}/${x}/${y}.png" the "" is the MapId.  I wonder if that MapId has something to do with it.  Maybe that mapId account has reached it's limit??  Back to square one.

  • Well i'm not sure if this is the right answer but I changed the line in MapsTab.js from "${z}/${x}/${y}.png" to "${z}/${x}/${y}.png?access_token=" + mapBoxAccessToken.  I have the variable 'mapBoxAccessToken' defined at the top.  I then signed up for a MapBox account and got an access token.  You can sign up

    Anyway like I said not sure if that's the right answer but it works now so that's all that matters :-)

  • Hi Brad

    Thanks for posting. Our development team are aware of this issue and are currently working on a solution. I'll let you know as soon as it is fixed.

    I think your solution will probably not work because your new mapbox account won’t have the necessary images and icons used by the mapping component.

    Many thanks


  • Thanks Emma!!  My solution appears to be working okay as far as I can tell.  I'm getting the different pins for company, oppos, cases, etc and the amenities are showing up as well.  but i'm glad you are aware of the issue and are fixing it :-)  Thanks again.

  • Downloaded the component from here:

    I assume that is the right place. Configuration guide refers to Open Street Map. I've been told it has changed to Map Quest and I need an account. The maps when I look at the tab refer to MapBox and not MapQuest.

    So, definitive answer please. What system is it using? MapBox? Do I need an account? Can the configuration guide be updated?