Embedding EasyTerritory within Dynamics 365 iFrame

The EZT IFRAME function allows you to load an EasyTerritory map as an iFrame on a form.  This iFrame will dynamically zoom to the record’s latitude and longitude specified on the form.

To configure this feature into your Dynamics 365 forms, follow these easy steps:

  • Download and import the EasyTerritory Unmanaged Solution for Dynamics 365 from Microsoft AppSource.
  • Register for a trial of EasyTerritory Enterprise.
  • In Dynamics 365 customization section or in Power Apps portal, navigate to the entity you’d like to embedded the EasyTerritory map on.
  • Add an iFrame/External Website to your page.
  • In the Properties section, specify unique name as: IFRAME_EasyTerritory
  • Specify URL as:
  •     https://apps.easyterritory.com/EasyTerritory instance id/app/index.html?projectId=project id&Lat=address1_latitude&Lon=address1_longitude
  • Add your EasyTerritory instance id, and project id into the URL. Lastly define the fields on the form you would like to map on the Iframe. For, instance if you would like to map the fields ‘address1_latitude‘ and ‘address1_longitude’ you would specify that after the &Lat= and &Lon= respectfully in the URL.
  • For customers using Azure Active Directory, include the following URL parameter at the end of the EasyTerritory URL:
    &useAdalPopup=true
  • Specify Label as: EasyTerritory

  • In the ‘iFrame Properties’ window click the ‘Events’ tab.
  • In ‘Form Libraries’ add ezt_iframeMap.js
  • In ‘Event Handlers’ add the Event: ‘OnReadyStateComplete’
  • Then click the ‘Add’ icon and in the ‘Handler Properties’ pop-up window type the function: ‘iframeMap’. Make sure you check ‘Enabled’.  Finally, press ‘OK’.
  • Before finishing, click ‘Save’ and ‘Publish’ to enable this feature on your forms.