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 initally accesses any data table for the first time. The Business Central Development Environment has wizards (object generation tools) to help you 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 users.
Our first list page will be the basis for viewing our Radio Show master records. From Visual Studio Code, click on New, then click on File. A New Page screen will appear. Click on New, type in the name of the file to be saved, and then click on Save. Enter the name (Radio Show Page.al). Now, we can use the snippet for the list pages called tpage:
Now we will set ID to 50100Â and the name to "Radio Show List"Â , and change the SourceTable to "Radio Show", as shown in the following screenshot:
After doing this, we can see that NameSource is highlighted as a problem, and the PROBLEMS window at the bottom of our screen tells us that NameSource does not exist in the context.
The reason why this problem is occurring is because of the combination of the table object and this page. We joined these objects by selecting the Radio Show table as SourceTable for this page. By joining them, the page object now has a dependency on the table object.
The next step will be to add the fields from the table to the page in the repeater. We will remove the NameSource field to do so.
We should also remove everything we do not need, such as FactBoxes and actions:
We can Preview the page by making a modification to the launch.json file. Change the startupObjectId to 50100 and select AL: Publish without debugging from the Command Palette, as shown in the following screenshot:
This will launch the Business Central application with our newly created page as the startup object:
Because our table does not contain any data, we will only see a header with the name of our page.