Programming Microsoft Dynamics NAV(Fifth Edition)
上QQ阅读APP看书,第一时间看更新

Creating a List page

Now we will create a List page for the table we created earlier. A List page is the initial page that is displayed when a user accesses any data table. The NAV Development Environment has Wizards (object generation tools) to help create basic pages. Generally, after our Wizard work is done, we will spend additional time in the Page Design tool to make the layout ready for presentation to users.

Our first List page will be the basis for viewing our Radio Show master records. From the Object Designer, click on Page, then click on New. The New Page screen will appear. Enter the name (Radio Show) or table object ID (50000) in the Table field. This is the table to which the page will be bound. We can add additional tables to the page object C/AL Global Variables after we close the Wizard, as then we will be working in the Page Designer. Choose the Create a page using a wizard: option and select List, as shown in the following screenshot. Click on OK:

The next step in the wizard shows the fields available for the List page. We can add or remove any of the field columns using the >, <, >>, and << buttons:

Add all the fields using >> and click on Next >:

The next Wizard step shows the Subforms, System FactBoxes, and Charts that are available to add to our page:

Subforms should properly be named Subpages. Such a change is being considered by Microsoft.

We can add these later in the Page Designer as needed. Click Finish to exit the wizard and enter the Page Designer:

Click on Preview to view the page with the default ribbon. Note that in Preview mode, we cannot insert, modify, or delete any of the layout or enter data. The Preview page is not connected to the database data. We need to compile the page and Run it to manipulate data. In the following screenshot, some fields are out of sight on the right-hand side:

The availability of some capabilities and icons (such as OneNote) will depend on what software is installed on our development workstation. Close the preview of the List page and close the window or press Esc to save. Number the page 50000 and name the object Radio Show List: