Maps for Microsoft CRM

Maps for Microsoft CRM

Maps are a diagrammatic representation that we see every day, that we use while we travel, and that we refer to in most of our communication. Maps are usually on a flat surface and they show a whole, or part of an, area. Maps have changed in many ways since we have started using them from the beginning of earth, or more accurately from the beginning of human life. Maps that were once drawn on a stone’s surface are found today on fancy displays on a touch screen mobile. Nowadays, most of us think of maps as something on flat surface, such as on a piece of paper, or on a computer screen. We have to ask: is a globe a map? The answer: a globe is the most perfect and precise map that has existed until today, as it represents the actual shape of the spherical earth.

Imagine what would happen if we peel an onion skin and try to make it flat on a kitchen cutting board. It splits and stretches. Exactly the same set of phenomena occurs when we try to make maps on a flat surface from a spherical shape. To keep the diagram accurate and precise, paper maps are drawn with complex set of mathematical algorithms, orchestrating proper skew, stretch, and squeeze. But rather than entering into the details of map creation semantics and complicacies, let’s discuss how maps are used in common software platforms.

Maps are gaining popularity. They are being incorporated into almost every type of computer application. Maps, as tools, have become ubiquitous. Why not use, or integrate, them into Customer Relationship Management (CRM) softwares such as Microsoft Dynamics? In this article, I provide a brief description of various ways that maps can be incorporated to Microsoft Dynamics.

  1. Bing Maps

Since December of 2012 Microsoft has enabled the use of default Bing maps in Dynamic CRM Products. Bing Map requires a developer key for the application-programming interface (API) to work.

map blog1

There is a section ‘Enable Bing Maps’ in the system setting page. The Bing Map API is obtained from

The Features at Bing Map section are click and drag to a particular location, Zoom in and out using scroll mouse, single click on the map to open bing web site. There were limitations before 2013 release, bing map was only available on the forms of Account, Contact, and Lead entity. CRM 2013 release extends to some more entities such as Quote, Order, Invoice, Competitor, and System user.

map blog2

Bing Map control can be inserted anywhere on the map, As Bing map uses an address to geocode the point and display in the form, user needs to choose an address field.

map blog3


map blog4

The Bing Map out of the box configuration can be extended using Bing Maps for enterprise developer API on HTML Web resources.

2. Google Map

 Google maps can be integrated to CRM just using an iFrame, Custom HTML Web resource. In the HTML a div tag is required, for example ‘geoloc’, looks like the example below:

<div id=”geoloc” style=”width: 600px; height: 400px;”></div>

With the latest version google API, keys are not required. We need to use http/https API’s based on the CRM configuration. Refer to Google’s java script API in the header. These look like:

For http: <script src=””></script>

 For https: <script src=””></script>

 Google Map with Geocoded Sample with No JQuery, reference can be found at

 3. Easy Territory

Easy territory is a mapping company that builds apps and integration modules for CRM. They are specific to CRM.

Easy Territory has the following components:

  1. MAPDOTNET UX Studio
  2. EASYAPP Application
  3. EASYMdn Web Service
  4. CRM Plug Ins

EasyTerritory leverages the powerful MapDotNet UX geospatial platform.  As described on the prerequisites page, you will need to download and install MapDotNet UX.

MapDotNet UX requires .NET 4.5 and the following IIS settings to be selected prior to installation.   If you’re installing on Windows Server 2012, .NET 4.5 will already be installed, however, be sure that the following components are also enabled.

map blog5

map blog6

MapDotNet UX Installer Download

32-bit Installer:

64-bit Installer:

NOTE: Choose the custom install option.  For On-premises, you will need to install the ‘MapDotNet UX Web Services’ on your application server. You can install ‘MapDotNet UX Studio’ on the server and/or your development desktop.  You can omit the ‘MapDotNet UX SDK’ on the server.

The EasyTerritory application is an HTML5 codebase and includes a set of REST services. Register with EasyTerritory for the download link to the latest build for On-premises deployment here.

Extract this zip file and do a copy deploy to your application server.  Give the entire folder ‘Network Service’ full privileges. When setting up the application under IIS, give it a dedicated application pool and set the .NET version to v4.0.30319.

map blog7Set the application user as ‘Network Service’ account.

map blog8Give the entire app folder ‘Network Service’ full privileges.

Open the application web.config and set the ‘mdnEndpoint’.  By default, the MapDotNet endpoint is installed at http://localhost/MapDotNetUX9.4  (Replace ‘localhost’ with the server name, IP address or host name).

Open MapDotNet UX Studio and create a map file called ‘EasyTerritory.’

The map file (*.mapx) contains the connection string information for the spatial SQL tables and also is used for defining the symbology (cartographic style) for server layers in EasyTerritory.

Launch MapDotNet UX Studio from the Start menu or Desktop.  Click the Server dropdown and navigate to ‘http://localhost/MapDotNetUX9.4‘.

map blog9Create a new map file called ‘EasyTerritory’.  You can delete the sample map files.

Follow these instructions to create the SQL tables that store your CRM data and their spatial representations and add layer configurations to your map file.

Access the administration view of the application by appending #admin to the URL.  The default password is ‘password’ and can be changed in the application web.config.  Example:  http://yourserver/app/index.html#admin

Connecting to on premise SQL with MapDOTNETUX:

If your CRM records already contain Latitude and Longitude information, you can register and use the data sync plugin first. If you don’t have latitude and longitude data, you can use the bulk geocoder or the spatial data editor plugin to create the coordinates from the addresses for your entity records.

Configuring Plugins and Web Resources at CRM

Register with, download and import the EasyTerritory Unmanaged Solution for Dynamics CRM.

Add the Web Resource to any Entity form.

Set the Web Resource properties.

map blog10These properties are delimited by an &. bing=Bing maps key for quick address lookup and address lookup based on form values. Get a trial key from
zoom=Starting Zoom Level
fullAddressCol=Field containing a full address string
latCol=Latitude Field (can be string or decimal)
lonCol=Longitude Field (can be string or decimal)

Easy Territory CRM Web Resources

map blog11

Configuring Data Sync Plug In

Launch the Plugin Registration Utility found in the Tools directory of the SDK folder.

Connect to your CRM instance, expand the DynamicsCRM.Plugins.DataSync, and right-click MDNSynchronizer to ‘Register New Step.’

Add steps for each entity we are adding synch to, we need three ‘Steps’ to handle Create, Update, and Delete.

map blog12

Register steps for messages ‘Create’, ‘Update’, and ‘Delete’ for all entities you wish to synch. Select the entity as the “Primary Entity.” Make all other selections on the left-panel as shown, except you may wish to uncheck “Delete AsyncOperation if StatusCode = Successful” to initially test that the Step is executing.

map blog13The “Unsecure Configuration” is built like a query string.


NOTE: Make sure your configuration string does not have linebreaks, the CRM plugin registration utility does not handle linebreaks properly.

&entityAlias=account&mappings=accountid:crmFk:guid;new_storename:storename:string&sqlEntityRefAttr=Name or ID


mdn= REQUIRED URI of your EasyTerritory map service endpoint.
map= REQUIRED EasyTerritory map ID (Use ‘EasyTerritory’)
layer=REQUIRED EasyTerritory layer ID defined using MapDotNet UX Studio. (you’ll have one for each table in SQL Azure that corresponds to your CRM entities.)
entityAlias=REQUIRED The entity alias used with the step Image, see below. You can set this to be whatever you’d like. NOTE: This is case sensitive.
crmFk= OPTIONALID of record in CRM used for building URL’s to record in the EasyTerritory map. 
REQUIRED Version of MapDotNet (use ‘9.0’ for 9.x+)
REQUIRED These are your field mappings from your CRM fields to your SQL Azure table fields. They should be formatted like this:[CRM Field with ID]:[SQL Column for CrmId needs to be uniqueid data type]:[data type];[CRM Field Name1]:[SQL Column1]:[data type];[CRM Field Name2]:[SQL Column2]:[data type] ,etc. Supported data types are: string, datetime, guid, money, bool, decimal. NOTE: The first configuration should be the CRM ID and corresponding SQL field for storing the ID.
sqlEntityRefAttr= OPTIONAL [ID or Name] If CRM field is an Entity reference, you can specify whether you want the ID or the Name stored in SQL.

Each Step will need an appropriate Image. Images are used to pass pre and/or post images of an entity record to the Step.

Right-click a Step and select “Register New Image” or right-click an Image and select “Update.”

map blog14For the Create Step, select Post Image, for the Delete Step, select Pre Image, and for the Update Step select both. Important: The synch plugin will not work correctly if the wrong images are selected! Name is optional. Entity Alias should match the “entityAlias” configuration setting described above and it is case sensitive.

map blog15In CRM Steps that have executed can be viewed under “System Jobs” in “Settings” mode. Note that “Succeeded” entries are only present if “Delete AsyncOperation if StatusCode = Successful” is unchecked. Example:

map blog16Create Maps using Easy Territory mapping application and put that in a Iframe in a dashboard:

map blog17map blog 18map blog19

4. ESRI Map

ESRI has developed a product known as ‘ESRI Maps for Dynamic CRM’, under ArcGIS Online. The requirement is that users have to be part of ArcGIS Online Organization, meaning that you need an ArcGIS Online Subscription or license for your organization.

Few highlights of functionality:

  • Map CRM data to see easily see where concentrations of customers or constituents exist.
  • Customize maps and add them to Dynamics CRM dashboards.
  • Access a rich collection of basemaps, demographic maps, image services, and data.
  • Visualize neighborhood demographics using pop-ups.
  • Calculate routes and build travel activity based on customer/prospect location.
  • Geocode, geoenable, and geoenrich CRM data using a Locate workflow.
  • Visualize CRM data by grouping according to attribute.
  • Save CRM data into views based on geographic selection and then use those views for other CRM activities like adding to marketing lists and sending emails.
  • Share maps with the rest of your organization using ArcGIS Online.
  • Single sign-on capability. With CRM on-premises, organizations can use the same login for their organization, for CRM, and for ArcGIS Online. With CRM On-line, organizations can use the same login for their organization and ArcGIS Online.
  • Esri Maps for Dynamics CRM is installed as a solution package.

map blog20

map blog21

By | 2016-12-14T11:34:54+00:00 February 24th, 2015|

About the Author:

Charan Mishra is a Senior Software Engineer at TrinityTG. He is one of TrinityTG’s GIS and CRM gurus.

One Comment

  1. […] Previous Mapping Microsoft CRM […]

Leave A Comment

WordPress spam blocked by CleanTalk.