Configure address, email, phone and B2B validation in Dynamics

Support DQE
Support DQE
  • Updated

Configure Custom Controls in Dynamics

This guide walks through the configuration of DQE One webservices in a Microsoft Dynamics 365 or Power Apps environment. Each webservice requires two levels of configuration: application-level settings (done once) and form-level settings (done per entity — Account, Contact, Lead).


Adding a PCF Control

All DQE webservices are configured by placing a PCF control on the target field in the form editor. The process is the same for every control type, on every entity — standard (Account, Contact, Lead) or custom.

  1. Open the target entity form in the Power Apps form editor.
  2. Select the field to configure (street, city, email, phone, etc.).
  3. In the right panel, click + Components, then select the corresponding DQE control.
  4. Map the required parameters. Required parameters must be bound to an existing field; optional parameters can be left unset. See each webservice section for the full parameter reference.
  5. Save and publish the form. Repeat for each entity and each address block where the webservice should be active.

Note: Each control must be configured independently per entity form. Application-level settings (DQE DataQ Settings) apply globally and only need to be set once.

Country Code options

Multiple controls accept country code parameters to pre-select the country for API queries. Three mutually exclusive options:

  1. Leave both countrycode and countryiso3 unset — no country pre-selection, the user selects the country manually.
  2. Set countrycode to the DQE Country lookup field — country pre-selected dynamically from the record.
  3. Set countrycode to a custom country table lookup + set countryfield to the logical name of the ISO3 field in that table.
  4. Set countryiso3 to a hardcoded ISO3 value (e.g. FRA) — country fixed for all records on this form.

Be careful: the old PCFs are prefixed with [Legacy], while the new PCFs do not have any [] prefix.


1. Addresses

The address webservice provides real-time address autocomplete and validation. It can be activated on the Account, Contact and Lead entities.

1.1 Application Settings

In DQE DataQ Settings → General, set the relevant toggles to Yes:

  • Enable Address Autocomplete — activates the address suggestion dropdown on address fields.
  • Enable Address Validation — activates the RNVP validation dialog on save.

Then go to the Address Setup tab:

  • Autofill Address Complement — enable to fill the complement field (building name, floor…) from the API response.
  • Address Default Country — pre-selects a country in the search field. Does not restrict international validation.
  • Contact / Account / Lead Address List — multi-select choice set per entity. Select which address blocks (Address 1, Address 2…) the webservice should be active on.

1.2 Address Validation (RNVP)

Address Validation is activated by the Enable Address Validation toggle in Application Settings (§1.1). When enabled, saving a record where address fields were manually edited (not selected from autocomplete) triggers an RNVP dialog — the user can accept or reject each suggested correction field by field.

Note: RNVP and Address Autocomplete are controlled by two separate toggles and can be enabled independently.

1.2.1 AddressFieldControl — Street field

AddressFieldControl · Custom API: DQE - Address - Search

ParameterTypeUsageRequiredDescription
lineSingleLine.TextboundRequiredStreet address line (the field the control is placed on).
citySingleLine.TextboundRequiredCity field — updated when a suggestion is selected.
postalcodeSingleLine.TextboundRequiredPostal code field — updated when a suggestion is selected.
complementSingleLine.TextboundOptionalAddress complement field (building name, floor…). Requires Autofill address complement enabled in Address Setup.
saidplaceSingleLine.TextboundOptionalLieu-dit / hamlet field. Map to a custom field to receive the locality value returned by the API.
dqecodedetailSingleLine.TextboundOptionalStores the RNVP return code after address validation. Can be used in Power Automate flows or business rules.
countrycodeLookup.SimpleboundOptionalLookup to the DQE Country table (or a custom country table). Used to pre-select the country.
countryfieldSingleLine.TextinputOptionalIf using a custom country table, the logical name of the field containing the ISO3 code in that table.
countryiso3SingleLine.TextinputOptionalHardcoded ISO3 country code (e.g. FRA). Use instead of countrycode when the country is fixed.
addressColumnsMultipleinputOptionalJSON defining custom columns in the address suggestion dropdown.
complementColumnsMultipleinputOptionalJSON defining custom columns in the complement suggestion dropdown.

1.2.2 CityFieldControl — City field

CityFieldControl · Custom API: DQE - Address - Search

ParameterTypeUsageRequiredDescription
citySingleLine.TextboundRequiredCity field (the field the control is placed on).
postalcodeSingleLine.TextboundRequiredPostal code field — updated when a suggestion is selected.
countrycodeLookup.SimpleboundOptionalLookup to the DQE Country table (or a custom country table).
countryfieldSingleLine.TextinputOptionalIf using a custom country table, the logical name of the ISO3 field in that table.
countryiso3SingleLine.TextinputOptionalHardcoded ISO3 country code.
customColumnsMultipleinputOptionalJSON defining custom columns in the city suggestion dropdown.

1.2.3 PostalcodeFieldControl — Postal code field

PostalcodeFieldControl · Custom API: DQE - Address - Search

ParameterTypeUsageRequiredDescription
postalcodeSingleLine.TextboundRequiredPostal code field (the field the control is placed on).
citySingleLine.TextboundRequiredCity field — updated when a suggestion is selected.
countrycodeLookup.SimpleboundOptionalLookup to the DQE Country table (or a custom country table).
countryfieldSingleLine.TextinputOptionalIf using a custom country table, the logical name of the ISO3 field in that table.
countryiso3SingleLine.TextinputOptionalHardcoded ISO3 country code.
customColumnsMultipleinputOptionalJSON defining custom columns in the postal code suggestion dropdown.

1.3 Expected Results

When Enable Address Autocomplete is active and the PCF controls are configured:

  • Typing an address: suggestions appear as the user types in the Street field.
  • Typing a postal code: suggestions are filtered by matching cities and streets.
  • Selecting a suggestion automatically fills City, Postal Code and any other mapped fields.

2. Emails

The email webservice validates email addresses in real time and can suggest corrections based on the contact's name. Available on Account, Contact and Lead.

2.1 Application Settings

In DQE DataQ Settings → General, set Enable Email Validation to Yes.

Then go to the Email Setup tab:

  • Contact / Account / Lead Email List — multi-select choice set per entity. Select which email fields the webservice should be active on.

Note: Name-based email suggestions are enabled at PCF level by mapping the firstnamevalue and lastnamevalue parameters on the EmailFieldTextControl. Return code storage is also configured at PCF level via the returncode parameter.

2.2 Form Configuration

In the form editor, select the Email field, click + Components, select EmailFieldTextControl, map the parameters, then save and publish.

EmailFieldTextControl · Custom API: DQE - Email - Validation

ParameterTypeUsageRequiredDescription
emailvalueEmailboundRequiredEmail field (the field the control is placed on).
firstnamevalueSingleLine.TextboundOptionalFirst name field. Used for name-based email suggestions. For Account entities, map to the company name field.
lastnamevalueSingleLine.TextboundOptionalLast name field. Used for name-based email suggestions.
returncodeSingleLine.TextboundOptionalOutput field that stores the DQE API return code after validation. Can be used in Power Automate flows or business rules.
countrycodeLookup.SimpleboundOptionalLookup to the DQE Country table (or a custom country table).
countryfieldSingleLine.TextinputOptionalIf using a custom country table, the logical name of the ISO3 field in that table.
countryiso3SingleLine.TextinputOptionalHardcoded ISO3 country code.

2.3 Expected Results

  • After the user enters an email, a validation indicator appears next to the field.
  • If first/last name fields are mapped, the webservice suggests likely email addresses and domain names.
  • If returncode is mapped, it is updated after each validation and can trigger downstream Power Automate logic.

3. Phones

The phone webservice validates phone numbers in real time and formats them per country. Available on Account, Contact and Lead.

3.1 Application Settings

In DQE DataQ Settings → General, set Enable Phone Validation to Yes.

Then go to the Phone Setup tab:

  • Address Default Country — pre-selects a country dial code. Does not restrict international validation.
  • Contact / Account / Lead Phone List — multi-select choice set per entity. Select which phone fields the webservice should be active on.

Note: Return code storage is configured at PCF level via the returncode parameter on PhonefieldControl.

3.2 Form Configuration

In the form editor, select the Main Phone field, click + Components, select PhonefieldControl, map the parameters, then save and publish.

PhonefieldControl · Custom API: DQE - Phone - Validation

ParameterTypeUsageRequiredDescription
namePhoneboundRequiredPhone field (the field the control is placed on).
returncodeSingleLine.TextboundOptionalOutput field that stores the DQE API return code after validation. Can be used in Power Automate flows or business rules.
countrycodeLookup.SimpleboundOptionalLookup to the DQE Country table (or a custom country table). Determines the dial code used for validation.
countryfieldSingleLine.TextinputOptionalIf using a custom country table, the logical name of the ISO3 field in that table.
countryiso3SingleLine.TextinputOptionalHardcoded ISO3 country code.

3.3 Expected Results

  • After the user enters a phone number, a validation indicator appears and the number is reformatted per the country's standard.
  • If returncode is mapped, it is updated after each validation and can trigger downstream Power Automate logic.

4. Name

The name webservice suggests civilités (Mr./Ms./…) based on the first name and can validate name-gender consistency. Available on any entity with a first name field (typically Contact, Lead).

4.1 Application Settings

In DQE DataQ Settings → General, set Enable Firstname Validation to Yes.

Then go to the Firstname Setup tab:

  • Address Default Country — pre-selects a default country for the webservice.
  • Firstname Configuration — opens the Name Mapping WebResource (see §4.2).

4.2 Name Mapping

Click the Firstname Configuration button in the Firstname Setup tab to open the FieldMapping WebResource. This is where you map DQE gender codes to your Dynamics choice set option values.

  • DQE returns three gender values: H (male), F (female), I (unknown/indeterminate).
  • For each value, set the corresponding integer option value from your Dynamics choice set field.
  • Mappings are stored in the dqe_field_mapping table in Dataverse.

Required when using genderchoice: if the genderchoice parameter is mapped on the FirstNameFieldControl but no mapping is configured here, the gender field will not be updated after name selection.

4.3 Form Configuration

In the form editor, select the First Name field, click + Components, select FirstNameFieldControl, map the parameters, then save and publish. Configure gender mapping first in §4.2 if using the genderchoice parameter.

FirstNameFieldControl · Custom API: DQE - Name - Search by firstName

ParameterTypeUsageRequiredDescription
firstnamevalueSingleLine.TextboundRequiredFirst name field (the field the control is placed on).
gendervalueSingleLine.TextboundOptionalHardcoded gender string: H (male), F (female) or I (unknown). Mutually exclusive with genderchoice.
genderchoiceOptionSetboundOptionalChoice set field containing the gender/civilité value. The mapping from DQE values (H/F/I) to CRM option values must be configured in the FieldMapping WebResource. Mutually exclusive with gendervalue.
countrycodeLookup.SimpleboundOptionalLookup to the DQE Country table (or a custom country table).
countryfieldSingleLine.TextinputOptionalIf using a custom country table, the logical name of the ISO3 field in that table.
countryiso3SingleLine.TextinputOptionalHardcoded ISO3 country code.

Gender configuration: choose one of three options — (1) leave both gendervalue and genderchoice unset, (2) set gendervalue to a hardcoded string, or (3) set genderchoice to a choice set field and configure the value mapping in the FieldMapping WebResource.


5. B2B

The B2B webservice provides company autocomplete from the French SIRENE database (INSEE). Available on the Account entity only.

5.1 Application Settings

In DQE DataQ Settings → General, set Enable Company Verification to Yes.

Then go to the Company Setup tab:

  • Company Mapping — opens the Field Mapping WebResource (see §5.2).

5.2 Field Mapping

Click the Company Mapping button in the Company Setup tab to open the FieldMapping WebResource. This defines which SIRENE data fields map to which Dynamics fields on the Account entity.

  • Mappings are stored in the dqe_field_mapping table in Dataverse.
  • Click Initialize Default Records to pre-populate a standard mapping. Safe to run multiple times — only creates missing records, does not overwrite existing ones.

5.3 Form Configuration

Add the two B2B controls to the Account form: CompanyField on the company name field and CompanyNumberField on the company number field.

CompanyField — Company name field

CompanyField · Custom API: DQE - Company - Search

ParameterTypeUsageRequiredDescription
nameSingleLine.TextboundRequiredCompany name field (the field the control is placed on).
countrycodeLookup.SimpleboundRequiredLookup to the DQE Country table. Determines which country's SIRENE database is queried.
filterSingleLine.TextinputOptionalFilter string passed to the RECSIRET API (e.g. active companies only, diffusible, associations). Contact your DQE project manager for available values.
columnsMultipleinputOptionalJSON defining custom columns in the company suggestion dropdown (see section 5.4).
outputtriggerSingleLine.TextoutputOptionalSet to "autocomplete" when the output was triggered by a user selection (not a manual change). Used in the Integrator Method to detect autocomplete events.
outputdataObjectoutputOptionalFull company data object returned by the webservice. Used in the Integrator Method to read and apply field values programmatically.

CompanyNumberField — Company number field

CompanyNumberField · Custom API: DQE - CompanyNumber - Search

ParameterTypeUsageRequiredDescription
accountnumberSingleLine.TextboundRequiredCompany number field / SIRET (the field the control is placed on).
accountidSingleLine.TextboundRequiredRecord ID of the current Account record. Used to avoid self-duplicate detection.
filterSingleLine.TextinputOptionalFilter string passed to the RECSIRET API (e.g. active companies only, diffusible, associations).
outputtriggerSingleLine.TextoutputOptionalSet to "autocomplete" when the output was triggered by a user selection.
outputdataObjectoutputOptionalFull company data object returned by the webservice.

5.4 Dropdown Columns

Override the default columns in the CompanyField dropdown by setting the columns parameter as JSON in the form XML.

[
  {"label": "Company",  "propertyName": "CompanyName",   "minWidth": 150, "maxWidth": 250},
  {"label": "Zip Code", "propertyName": "ZIP_Code",      "minWidth": 150, "maxWidth": 250},
  {"label": "SIRET",    "propertyName": "CompanyNumber", "minWidth": 150, "maxWidth": 250},
  {"label": "Ref",      "propertyName": "Ref",           "minWidth": 150, "maxWidth": 250}
]

Available property names:

CompanyName CompanyNumber ZIP_Code CompanyAddress1 CompanyAddress2 CompanyAddress3 Locality Phone Email Activity1 Activity2 StaffCount TurnOver LegalStructureCode LegalStructureLabel IncorporationDate DissolutionDate Country CompanyStatus MainCompanyFlag Ref

Tip: A form XML editor plugin from XrmToolBox can simplify exporting and editing the form XML.

5.5 Filter Parameter

Both CompanyField and CompanyNumberField accept an optional filter parameter passed directly to the RECSIRET API. It can be set statically in Component Properties or dynamically from a field value. Contact your DQE project manager for available filter strings.

5.6 Expected Results

  1. User opens an Account record and starts typing a company name or SIRET.
  2. A dropdown appears with matching companies from the SIRENE database.
  3. User selects a company — mapped fields (address, SIRET, legal form…) are filled automatically.
  4. On save, if Dynamics detects a duplicate, the native duplicate detection pop-up appears.

Important: Selecting a country before searching is mandatory.

Related to

Was this article helpful?

0 out of 0 found this helpful