Implementing the Address Integration Pattern
We can implement the Address Integration pattern on our Example Person table. This involves adding the fields that allow us to enter an address as well as adding an option to the Format Address Codeunit 365
to print the address:
The fields Name
and Name 2
already exist in the Example Person table, we need to add the other fields as described in Chapter 3, Design Patterns.
Tip
By copying and pasting the fields from another table we ensure the correct field names & numbers, table relations and validation code.
The fields City
and Post Code
also have cross reference checking using the Post Code table 225.
In order for this to be enabled, we need to declare the Post Code table as global variable. The following screenshot shows the validation logic in the City
and Post Code
field:
The address fields should also be added to the card page, and if required, also on the list page.
To enable printing of the address we need to add a function...