Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Programming Microsoft Dynamics 365 Business Central - Sixth Edition

You're reading from  Programming Microsoft Dynamics 365 Business Central - Sixth Edition

Product type Book
Published in Apr 2019
Publisher Packt
ISBN-13 9781789137798
Pages 536 pages
Edition 6th Edition
Languages
Authors (3):
Marije Brummel Marije Brummel
Profile icon Marije Brummel
David Studebaker David Studebaker
Profile icon David Studebaker
Christopher D. Studebaker Christopher D. Studebaker
Profile icon Christopher D. Studebaker
View More author details

Table of Contents (12) Chapters

Preface Introduction to Business Central Tables Data Types and Fields Pages - The Interactive Interface Queries and Reports Introduction to AL Intermediate AL Advanced AL Development Tools Successful Conclusions Assessments Other Books You May Enjoy

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 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.

You have been reading a chapter from
Programming Microsoft Dynamics 365 Business Central - Sixth Edition
Published in: Apr 2019 Publisher: Packt ISBN-13: 9781789137798
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}