Introduction
There are cases in Dynamics 365 that do not warrant the need for a full-fledged mapping experience. This is where the Model-Driven Search control is useful.
It binds to a Singleline Text column, as well as a number of address related text columns, and will allow you to search for addresses or locations, selecting the result will populate the bound address columns with the given data.
Release
The solution containing this control can be downloaded here: Maptaskr Model-Driven Search PCF
Prerequisites
Maptaskr for Dynamics 365 or Power Apps must be installed, licensed and configured. The PCF heavily depends on the providers configured in Managing Mapping Service Providers.
The tables in which you would like to use this control should have an additional column created that will be used to bind the control to the form.
It is strongly recommended NOT to have this PCF and the standard Maptaskr record-level map in the same form. The behaviour of the bound address fields may cause unexpected behaviour.
How to use
After installing the solution, navigate to the workable solution in Power Apps Portal.
For demonstration purposes, we will use the Account
entity.
Firstly, create a new column for binding the PCF to.
Then, find which form you'd like to add the control to, and edit it. We will demonstrate this on a copy of a main form.
Drag the newly created column into the form. For brevity, we are adding this into the same section containing the address fields.
Select the column, then choose Components
on the bottom right of the component navigator. The Maptaskr ModelDriven Searchbox
control should be present. If you find that it's missing from the list, select Get More Components
and it should be available from the list of controls.
Now you will be prompted to bind all relevant address fields to columns on your form.
Latitude (string)
and Longitude (string)
are designed for storing coordinates that exceed the maximum decimal limit of standard D365 decimal/floating point columns. If accuracy of coordinates is important, then it's recommended to use these fields.
The fields for the control are as follows:
Name | Purpose |
---|---|
Unit | Will store information on house unit numbers (if applicable) |
Street | Will store main street address (if applicable) |
City | Will store the name of the city (if applicable) |
State | Will store the name of the state (if applicable) |
Postal | Will store post or zip codes (if applicable) |
Country | Will store name of country (if applicable) |
Latitude | Will store latitude of the selected location/address |
Longitude | Will store longitude of the selected location/address |
Latitude (string) | Will store latitude with more than 10 decimal points |
Longitude (string) | Will store longitude with more than 10 decimal points |
MaxResults | Will determine how many location/address results are to be displayed on the control |
Once you have configured all the fields you would like to use, select Done
, and Save and Publish
the form.
That's it! Now let's see it in action.