Exercise - Create a List page

Completed

Simon creates the List page and follows the naming standards, guaranteeing that users can't edit information. When a user double-clicks a course, the Course Card page displays the selected course. Simon also makes sure that the New, Edit, and View actions work as expected.

Tasks

  • Create a List page with fields by using code snippets.

  • Set the basic page and field properties.

Steps

  1. Select File > New File and then immediately save this file by selecting File > Save. Name the file CourseList.Page.al.

  2. Create a new page in this file by using code snippets. Enter tpage and press the Tab key.

  3. Change the ID to 50101 and the Name to CRONUS Course List.

  4. Set the SourceTable property to CRONUS Course and set the Caption property to Course List.

  5. Set the PageType property to List and set the UsageCategory property to Lists. Verify that the ApplicationArea property is set to All.

  6. Set the Editable property to false.

  7. Set the CardPageId property to CRONUS Course Card.

  8. Verify that a content area was created in the layout section. If not, create an area called content.

  9. Remove the group in the area content and add a repeater with the name General.

  10. Add the following fields in the repeater: Code, Name, Description, Price, Instructor Name.

  11. Verify that the ApplicationArea property is set to All for all fields on the page.

  12. Open the Course.Table.al file and set the LookupPageId and DrillDownPageId properties to CRONUS Course List.

  13. Open the launch.json file in the .vscode folder, and then set the startupObjectId setting to 50101 and the startupObjectType to Page.

  14. Publish your extension to the sandbox. Select View and Command Palette... (Ctrl+Shift+P).

  15. Enter AL: Publish (F5) in the search box and select the command from the list.

  16. Verify that the Dynamics 365 Business Central application launches and the Course List page appears. Now, you can enter data.

  17. Enter the following data by selecting the New button in the menu. You can select any instructor that you want.

Code Name Description Type Duration Price Active Difficulty Passing Rate
80040 Installation & Configuration Basic knowledge of installation and configuration Remote Training 2 1,000 Yes 5 75
80042 AL Introduction Introduction to programming Instructor Led 5 2,500 Yes 8 80
80043 Introduction Introduction to Microsoft Dynamics 365 Business Central Remote Training 2 1,000 Yes 4 60
80049 Application Setup Basic knowledge of application setup E-Learning 2 1,000 Yes 5 65
80050 Business Intelligence Basic knowledge of Business Intelligence E-Learning 1 500 Yes 5 65