Build a page layout by using controls

Completed

Page controls allow you to display data to the user. That data can be a field from the database or a value of an AL expression. It might be a bitmap picture or static information. It can also be other pages or control add-ins by using a page part or predefined system features such as Outlook or Record Links.

Controls on a page are always positioned in an area. A regular Card page or List page has two areas:

  • Content area - The largest (left) part on a page, where you can put fields, parts, and so on.

  • FactBox area - The smallest (right) part on a page, where you can put other page parts.

Screenshot showing the Content and FactBox areas of a page.

A RoleCenter page only has one area, the RoleCenter area.

Fields on a Card page

Before you can add fields on a page, you must first define your layout structure. A Card page is built with several FastTabs, which are groups of fields that are displayed in bold. You can collapse or expand these FastTabs.

The Customer Card contains the General, Address & Contact, Invoicing, Payments, Shipping, and Statistics FastTabs.

Screenshot showing FastTabs on a Card page.

To create FastTabs, you need to define them in AL as groups, as shown in the following image.

Screenshot showing how groups on a Card page are used to create FastTabs in AL.

Within a group, you can enter the necessary fields and the caption of the group.

Screenshot showing how to define fields in a group.

Fields on a List page

On a Card page, you can use groups to specify which fields are displayed on a page. With a List page, you don't use groups but rather a repeater. A repeater indicates to Business Central that it must repeat for each record of that table. Only one repeater exists on the page.

Screenshot showing how to create a Repeater on a List page in AL.

Cue group

Cues and cue groups are typically used in Role Centers. They emphasize the important information for users in specific roles and are therefore a key part in role tailoring. Cues are used to visually provide a way to show the number of entities in a table and view the entities in a filtered list.

A cue can show the total number of contacts or the total number of open opportunities. For example, it can display all invoices due or sales orders that were delayed.

Screenshot showing Cue groups on a page in Business Central.

When you create a page, you can group cue fields inside a cue group. In the preceding example, Ongoing Sales, Ongoing Purchases, My User Tasks, Approvals, Payments, and Incoming Documents are all cue groups.

Within a cue group are the cue group fields such as Sales Quotes, Purchase Orders, or Unprocessed Payments.

In AL, you can define these cue groups by using the keyword cuegroup instead of using a regular group. The CueGroupLayout property can be set to Wide to display larger amounts, such as the Overdue Sales Invoice Amount from the previous example.

Coding example of how to define Cue groups in AL.

Fixed layout

Along with the default layout of a Card page or a List page, Business Central also has support for a fixed layout.

The application has some pages that are used to display statistics. On these pages, you can display many fields in a multicolumn layout.

In the following example, information is displayed in four columns. Keep in mind that the information in a fixed layout container is always read-only.

Screenshot showing an example of a Fixed layout on a page.