Implementing a Document
To implement a Document we must follow the following Diagram. Remember that the Document Type is optional.
For our Example Document the table structures look as displayed in the following screenshot:
We also need a set of page objects. A list and a card page, as created for the Master Data, and a page for the lines as subpage for the card:
Note
Please note that although Microsoft internally still uses the term Subform, we will call ours Subpage. Subform was a term used in the Classic Client in Dynamics NAV 2009 and earlier versions.
We now have the basic structure that we need to create a document, but in order to be able to implement the Example Journal as part of a posting process we also need to add references to our Master Data. We will reference our Example Person as part of the Document, and the Example Product as part of the Document Line. This way we can create an Example Journal Line for each Document Line when posting a Document.
To implement...