Embed EasyTerritory Map Into CRM Entity Form

Following the instructions below, you can embed EasyTerritory project directly into a Microsoft Dynamics 365/CRM Entity form.  This will allow you to open a CRM record and have the EasyTerritory map project zoom and center the map on based on the record’s location.  The feature can be used with out-of-the-box lat/lon fields or custom lat/lons.

Here are the setup steps:

  1. Register with EasyTerritory.com, download and import the EasyTerritory Unmanaged Solution for Dynamics CRM.
  2. Browse to target Entity’s form configuration page (e.g. Account, Lead, Opportunity, or a custom Entity)
  3. Click insert and click ‘iFrame’.
  4. Specify unique name as: IFRAME_EasyTerritory
  5. Specify URL as:
    1. EasyTerritory Cloud-hosted: https://apps.easyterritory.com/{YOUR CUSTOMER GUID}/app/index.html?projectId={YOUR SAVED PROJECT’S GUID}&Lat=address1_latitude&Lon=address1_longitude
    2. EasyTerritory Cloud-hosted: https://{YOUR EASYTERRITORY URL}/app/index.html?projectId={YOUR SAVED PROJECT’S GUID}&Lat=address1_latitude&Lon=address1_longitude
    3. NOTE:  The Lat and Lon parameters are the schema names for the fields storing the Lat and Lon data.  You can use custom fields if you’d like.
  6. Add your Easyterritory instance, project id, and which fields on the form you would like to map.
  7. Specify Label as: EasyTerritory
  8. In the iFrame properties window click the ‘Events’ tab.
  9. In ‘Form Libraries’ section add the library: ‘ezt_iframeMap.js’
  10. In ‘Event Handlers’ section add the function: iframeMap
  11. Click save and publish.