Easily Add Addresses Fast Tab in Dynamics 365 for Operations with Logistics Postal Address Grid
Adding an Addresses Fast Tab to a form in Microsoft Dynamics 365 for Operations (AX7) is now as easy as adding the new LogisticsPostalAddressFormGridPart to your form and setting a few properties. The only requirement is that you have an entity that is mapped to DirPartyPostalAddressView (via DirPartyMap). I am creating a custom entity, SSILienHolder, that has a relationship to DirPartyTable, so I will leverage that relationship to manage my addresses.
To use, Create an Address Fast Tab and drop a FormContainerControl on it. The FormContainerControl is a new control that hosts another form as a control allowing you to build reusable user-interface components.
Once you’ve added the control, set the MenuItemName property to “LogisticsPostalAddressGridFormPart” and Run Mode to “Local”. This will tell the control to load the LogisticsPostalAddressGrid form and display it in the Fast Tab.
Next, expand the FormContainerControl and add a new “Field relation link”. Similar to a relation on a Table, this is the glue that tells the control how to navigate from your table to the DirPartyPostalAddressView. You need to set the DataField, DataSource, TargetDataField, and TargetDataSource properties on the link.
When the FormContainerControl instantiates the form, it uses the data from the Field relation link to populate an Args class for the form. If you look at the design of the LogisticsPostalAddressGrid form, you will see that it has 2 form data sources, Common and DirPartyPostalAddressView. The Common data source acts as a proxy for the data source you pass to the Field relation link. When the form loads, it assigns your table buffer to the Common data source and adjusts the relationship to DirPartyPostalAddressVew using the DirPartyMap.
Now when you run your form, you have a fully-functional Addresses Fast Tab.