Classic view
Use the 'classic' view for all configuration of the PCF components.
Address mapping maps a collection of data values returned by the address API (and additional enrichment datasets if configured) to a collection of Microsoft Dynamics entity fields. An address mapping is always associated with a single Microsoft Dynamics entity and must be named. A Microsoft Dynamics entity may have as many address mappings configured as there are addresses held by the entity. The solution comes pre-configured with two simple address mappings (named Address1 and Address2) for the address1_* and address2_* fields of the standard entities Account, Competitor, Contact and Lead. These pre-configured mappings may be used out-of-the-box to perform simple address searches on the standard entities (skip to the section To bind the fields to your forms to start using the built-in address mappings).
The pre-configured address mappings can be modified to suit your needs. You can also create new address mappings for any Microsoft Dynamics entity.
Changing the default mapping names?
If you rename the default mappings Address1 or Address2 or create new ones with different names you must be sure to update the Mapping name within the related address field's properties as described below.
To populate entity fields with values returned by the address API configure an Address mapping by following the steps below:
- Go to the Configuration page.
- Click the Map fields tab.
- From the entities list on the left select the entity for which you want to configure an address mapping.
- Either select an existing mapping from the list in the MAPPINGS column or click + ADD to create a new mapping (enter a name in the textbox labelled Name in this case).
- The names of the standard address values returned by the API are shown under the tab heading Standard address fields and under each name is a drop-down listbox that contains fields of the associated entity. Click on each drop-down listbox and select the field that you want populated by that API value.
The dropdown list is separated into three types for convenience, depending on what the field was created under:
* Text, the text returned by the address API is stored in the field.
* Choice, the item selected for the choice field will be the one where the text of the choice item matches the text returned by the API using a case insensitive match. (Choice refers to Option set in the Classic version)
* Lookup, the lookup record selected for the field will be the one where the text of the primary name column of the Lookup entity matches the text returned by the API using a case insensitive match.
If you map to a Choice or Lookup field without additional configuration, an empty value will be saved to the mapped field if a match is not found amongst the Choice or Lookup values.
- Optionally, if you want to save the validation result and timestamp, select field values from the drop-down listboxes for Address validation message and Address validation timestamp API properties after you have created these fields for the entity. See Validation tracking fields if you have not yet created these fields.
- The names of the components, metadata and enrichment properties that have been selected under the Configure additional data tab are shown under the tab heading Address data fields. Click this tab heading to show the drop-down listboxes where you can map the data values returned by these additional data properties to entity fields.
- Click on the drop-down listbox for each data property you would like to map and select the entity field that you want populated by the value returned by the API. You will need to ensure that the fields to accept the data values have been created on the entity beforehand.
- For any standard address or other data property that you want to ignore, choose the value Not mapped from the drop-down list.
- Go to Customize the System.
- Expand Entities in the left panel.
- Expand your chosen entity you want to add the fields to (e.g. Account) and click Forms under the chosen entity.
- Click your chosen form you want to add a field to (e.g. Account Quick Create). This will open a new window.
- Select Form Properties from the ribbon to open the Form Properties dialog box. In the Events tab click the top "Add" button and add the web resource "edq_formmanager" to the form.
- With the OnLoad event selected, click the bottom "Add" button to open the "Handler Properties" dialog box. For library select the previously added "edq_formmanager" and in the textbox labelled Function type in "edq_onLoadHandler" (exclude the quotes). Be sure that both checkboxes labelled "Enabled" and "Pass execution context as first parameter" are selected.
- Click "OK" to close the Form Properties dialog box.
- Select the field you need to map.
- Click Change Properties, and go to the Controls tab.
- Click Add Control….
- Scroll and select EDQAddress, and click Add.
- Select where you want the control to be enabled - Web, Phone and/or Tablet.
- Click the pencil icon by Mapping name.
- Select Bind to a static value and in the text box enter the Mapping name (e.g. Address1) from the Map fields tab in the Configuration page.
- Click OK.
- Repeat steps 8-15 for each field you want mapped using the custom mapping you created in the Configuration page.
When populated fields are unmapped
If a form field mapped in an Address Mapping has been used to populate entity records and is subsequently unmapped from the mapping, the field values for the records that have already been populated will need to be cleared. Otherwise, there is the possibility that the value in the field is associated with an address returned from a subsequent address validation.