Exercise - Create a Card page

Completed

Simon wants to follow the standard recommendations for cards and lists. Simon first creates a Card page, names it according to Card page naming rules, and then saves it.

Tasks

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

  • Set the basic page and field properties.

  • Create actions on a page.

Steps

  1. Select File > New File and then immediately save this file by selecting File > Save. Give this file the name CourseCard.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 50100 and the Name to CRONUS Course Card.

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

  5. Set the PageType property to Card and set the UsageCategory property to None. Remove the ApplicationArea property on the page level.

  6. Verify that a content area has been created in the layout section. If not, create an area called content.

  7. Change the name of the first group to General. Set the Caption property of the group to General.

  8. Add the following fields in the General group: Code, Name, Description.

  9. Create another group with the name Details under the General group. Set the Caption property for this group to Details.

  10. Add the following fields in the Details group: Duration, Price, Type, Active, Instructor Code, Instructor Name.

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

  12. Verify that an action was created in the Processing area. If not, create a new action.

  13. Change the name of the action Resource Card and set the following properties on that action:

    • Caption: Resource

    • ToolTip: Open the Resource Card

    • RunObject: Page Resource Card

    • RunPageLink: No. = field(Instructor Code)

    • Image: Relationship

    • Promoted: true

    • PromotedCategory: Process

    • ApplicationArea: All

  14. Remove the OnAction trigger.

  15. Remove the myInt variable.