Postal and electronic addresses integration using dual-write party model and global address book app (Part 3)
Table of Contents
In this blog post, we are covering how to create and manage in Dataverse multiple postal and electronic addresses for parties and customers. This is the third and last blog post of a series dedicated to the dual-write party model and global address book app.
Blog Post 1 - What is it and when to install the dual-write party model and global address book app ? (Part 1) (dynamics.com)
Blog Post 2 - Dataverse customers, vendors and contacts with dual-write party model and global address book app (Part 2) (dynamics.com)
Address integration with dual-write party model and global address book app
A key benefit of the dual-write party model and global address book app (GAB) is that it supports adding and integrating as many postal addresses and electronic addresses as required. The addresses are synced at party level and can be consumed as they are required for quotations and orders. As such, you are no longer limited to maximum 2 postal addresses per account and maximum 3 postal addresses per contact.
A key benefit of the dual-write party model and global address book app (GAB) is that it supports adding and integrating as many postal addresses and electronic addresses as required. The addresses are synced at party level and can be consumed as they are required for quotations and orders. As such, you are no longer limited to maximum 2 postal addresses per account and maximum 3 postal addresses per contact.
For address management in the context of dual-write GAB app, Dataverse schema has been enhanced with new tables to allow adding multiple postal and electronic addresses:
- Postal Address - logical name msdyn_postaladdress. It is associated with a party and it stores address fields (country, city, street etc.) and address purpose.
- Electronic Address – logical name msdyn_partyelectronicaddress. It will store electronic address rows such as email, phone numbers, fax etc.
The app includes new tables maps to sync the postal and electronic addresses and related records:
Table maps required to sync addresses using GAB app
Postal Address integration
There are multiple ways to add addresses for a customer, contact person or vendor:- By using the denormalized fields on account form: address1 and address2, and contact form: address1, address2, address3. But you are limited in the number of addresses you can add.
- By using the customeraddress table – via the new tab Addresses on account and contacts forms. You can add multiple addresses in this way.
- By using the msdyn_postaladdress table – via party form or vendor form, Postal Addresses tab. You can add multiple addresses in this way as well.
You can use any of these methods and rely on the GAB plugins for keeping all the address rows in sync.
Postal address syncronization across Dataverse and F&O
For the postal address syncronization, please consider the following:
- Address Purpose (Business, Invoice, Delivery, etc.) is only available on msdyn_postaladdress and customeraddress tables. When the address is created from the denormalized address fields on account or contact, a purpose is automatically set for that address entry. e.g. Delivery purpose is added for account address1.
- Address number e.g. 1, 2, 3 is not available on the msdyn_postaladdress form. When an address is created using the msdyn_postaladdress form, the addresses will be synced by the GAB plugins into the denormalized address fields and customeraddress rows based on the creation order.
- The OOB table maps provided to sync addresses between Dataverse and F&O use the Postal Address (msdyn_postaladdress) as Dataverse source.
- All addresses are synced up to party level and across all party roles by the GAB plugins. For example, if a party is released as a customer of type organization in 2 companies, as such 2 accounts will be created for the 2 companies, then all the addresses added on these 2 accounts will be synced at party and customer level in msdyn_postaladdress and customeraddress rows.
- The GAB plugins only sync OOB fields and of course the OOB table maps refer to the OOB fields.
- If you create custom columns, those will not get synced by the GAB plugins. For data consistency, the core OOB address fields should also get populated. e.g. upon selecting a country from a new custom country lookup column that you created on the msdyn_postaladdress table, try to ensure that the country code free text column (msdyn_countryregionid) will also get populated.
TIP: It is recommended to manage addresses with the grids of either msdyn_postaladdress or customeraddress tables so that users can add as many addresses as needed.
Address validation
In the context of dual-write, the address validation has been delegated to F&O as it benefits from rich address validation mechanisms. There are also schema differences where for example country, county, state, etc., are free text in Dataverse whilst they are drop-down lists in F&O. For address validation in Dataverse, you can implement customizations such as creating new custom tables for storing ZIP codes or Countries, Counties etc., or client-side scripting, or third-party address validation APIs. You can use F&O as data source for potential new custom tables for initial data load.
If you need to implement address validation in Dataverse, it is very important to consider the following:
- If you use the denormalized fields for address input, consider that you are limited in the number of addresses you can add (max 2 for account, max 3 for contact) and you cannot select an address purpose.
- If you use the Addresses grid on account or contact form with customeraddress type of records, please consider that lookups (1:N relationships) cannot be created on customeraddress table.
- If you use the Postal Addresses grid with msdyn_postaladdress type of records, there are no customization constraints.
Electronic Address tab on account form with Party Quick View form
Electronic Address integration
For adding multiple electronic addresses, a new tab has been added to the account, contact and vendor form.
Electronic addresses on account form
Electronic address with Type Phone, Email or Fax and Is Primary = Yes, are synchronized by GAB plugins to the telephone1 or mobilephone (depends if the main phone is mobile or not), emailaddress1, websiteurl and fax columns on the account or contact tables.
Electronic address syncronization across Dataverse and F&O
Electronic addresses can also be added directly from the party form, and they are synced to all party roles e.g. if the party is released with customer and vendor roles, an email added for the customer will also be available for the vendor.
New electronic address on party form
New electronic address on party form
Global Address Book in Dataverse
On the quote and sales order form, you can leverage the addresses created already for the customer. Bill To Address and Ship To Address are lookups to the msdyn_postaladdress table filtered via java script for address purpose being Invoice, respectively Delivery. Once a postal address is selected, the corresponding denormalized quote and sales order address fields are populated.
Billing address selection on quote in Dataverse
Party model and Global Address Book Tips
To conclude the series on the dual write party model and global address book, here are some recommended best practices:
# | Best practices |
1 | Add party, postal address, postal address history, postal address collection to the site map of your app (first party or custom) in order to use the Party form and Quick Create forms for these new tables. Learn how Add the party page to your app. |
2 | Make sure you use the latest solutions. Check Whats new or changed in Dual-write for app updates. |
3 | Plan for ‘Contact for Party’ entity impact from technical and functional perspective. Ensure you leverage the Quick Create forms for contact person rows. |
4 | When implementing Power Pages, the portal users must remain unstriped contacts in Dataverse. i.e. not company specific. |
5 | Consider address input flow and address validation – currently its being fully delegated to F&O. |
6 | Customers are recommended to use 2-char ISO codes for the ‘Country’ while creating a postal address in Dataverse. |
Comments
-
Postal and electronic addresses integration using dual-write party model and global address book ...Thank you for your efforts on the D365 CE implementation – the concept is truly innovative. As a Microsoft Dynamics 365 consultant, I've been using this at a major client for over a year.However, I've encountered a persistent bug in the "Dual-write Party and Global Address Book Solutions." Microsoft Support acknowledges this but lacks a fix. The issues are:
- Contact Record Saving Time: Increases to 6-30 seconds from the usual 1-2 seconds.
- Multiple Power Automate Flow Runs: Each Contact record save triggers 3-9 Flow runs, particularly when modifying address fields. This occurs even in a vanilla environment with no active Dual Write.
This significantly impacts usability, and I'm hesitant to recommend it to other clients despite its potential. Additionally, the Address sync between CE and UO is incomplete, leading to discrepancies across platforms like Outlook and Teams.I am keen to assist in resolving these issues. Please let me know if my involvement can expedite a solution.
*This post is locked for comments