Repeater and Factbox in Pages - Muhammad-Ali-Mughal/Microsoft-Dynamics-BC-AL-Extension GitHub Wiki

Using Repeater and FactBoxes in Pages

Both of these components of a page helps in defining a better UI of the page.

Repeater

Usually, Repeater is used rather than Group in List and List Part pages. The reason is that Repeater repeats itself more smoothly and list all the records because its behavior is defined to do so. But if you use Group instead than you'll see a clear difference that the group will list all records on a full page and all the other components will move below the page creating a large empty space. Group is defined to be used in Card and Card Part pages rather than List pages. Repeater is much better in case of List and List Part pages because it adjusts its size according to the number of record and keeps the format of the page good.

Factbox

In the layout section of the page, area is defined. In pages Area is of two type, Content and FactBoxes. Content defines the fields in the main area of the page while FactBoxes define fields in the right-hand side sidebar like structure of the page. FactBoxes are used to display some important fields of the opened record.

Syntax

Following is the syntax of using a Repeater and FactBox in a page:

page 50100 "Cronus Course List Page"
{
    PageType = List;
    ApplicationArea = All;
    UsageCategory = Lists;
    SourceTable = "CRONUS Course";
    CardPageId = "Cronus Course Card Page";

    layout
    {
        area(Content)
        {
            repeater(Hello)
            {
                field("Customer No."; Rec."Customer No.")
                {
                    ApplicationArea = All;

                }
                field(Name; Rec.Name)
                {
                    ApplicationArea = All;
                }
            }
        }
        area(Factboxes)
        {
            part(List_page_factbox; "Cronus Course CardPart")
            {
                Caption = 'List Page Fact Box';
                ApplicationArea = All;
            }
        }
    }
}