Step 5: Creating a Master-Detail View Link
A view link connects view objects using key values (usually a foreign key). In this next step you will create a master-detail view link between Orders and OrderItems. This will allow the user to see an order and all the order items (line items) that order contains.
To create a master-detail view link between OrdersView and OrderItemsView:
1- In the System Navigator, right click your package node and choose New View Link from the popup menu.
2- On the Welcome page, review the information there and click Next.
3- On the Name page, enter a name of OrdersViewLink.
4- On the View Objects Page, select OrdersView as the Source View Object and OrderItemsView as the Destination View Object. Click Next.
5- On the Source Attributes page, in the lower pane of Available Associations, shuttle OrderItemsOrderIdFkAssoc to the Selected Attributes pane.You can use the associations defined in the database to create view links.
6- Click Next. On the Destination Attributes page, notice that OrderId is the attribute that the view link is based on, which is a foreign key in OrderItemsView. Therefor, you don't need to choose any additional attributes to link on.
7- Click Next and then click Finish.
Now that you have your view objects coordinated in a meaningful way, you need to be able to make them accessible to client applications. The business component responsible for this is the application module.
In the next step, you will create an application module.