Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The navigation area appears at the top of a Role Center and contains sections that help users go to pages and perform actions in Dynamics 365 Business Central. The client separates it into the navigation menu, navigation bar, and actions area. Learn more about the layout in Designing Role Centers. In AL, the area() control defines these areas.
Adding to the navigation menu
The top-level navigation area is the navigation menu. It contains one or more root menu items that expand to show links to other pages. You define the links with action() controls and can group them into submenus that match the needs of the user role. Target pages open in the content area of the Role Center.
You define the navigation menu by using an area(Sections) control in the page code.
Example
The following example adds the My Customers root item to the navigation menu of the Sales Order Processor Role Center. My Customers contains the Customer Bank Account List and Customer Ledger Entries actions, which open the corresponding pages. It also contains a group with two actions that open sales documents.
pageextension 50120 ExtendNavigationArea extends "Order Processor Role Center"
{
actions
{
addlast(Sections)
{
group("My Customers")
{
action("Customer Bank Account List")
{
RunObject = page "Customer Bank Account List";
ApplicationArea = All;
}
action("Customer Ledger Entries")
{
RunObject = page "Customer Ledger Entries";
ApplicationArea = All;
}
// Creates a sub-menu
group("Sales Documents")
{
action("Sales Document Entity")
{
ApplicationArea = All;
RunObject = page "Sales Document Entity";
}
action("Posted Sales Invoices")
{
ApplicationArea = All;
RunObject = page "Posted Sales Invoices";
}
}
}
}
}
}
You can also make pages and reports available in search. Learn more in Add pages and reports to Tell Me.
Adding to the navigation bar
The second-level navigation is referred to as the navigation bar. The navigation bar offers a flat list of links to other pages. Navigation-bar links should open the pages most relevant to the user's business process. Place only the most important links at this level and place the other links in the top-level navigation.
You define the navigation bar by using an area(Embedding) control in the page code.
Example
The following example uses an area(Embedding) control to add the Sales Cycles page as the last link in the navigation bar.
...
addlast(Embedding)
{
action("Sales Cycles")
{
RunObject = page "Sales Cycles";
ApplicationArea = All;
}
}
Adding to actions
The actions area displays the tasks and operations that users need most often. It contains links to pages, reports, and codeunits. You can place links at the root level or group them in a submenu.
You can define the actions by using three different area() controls.
The first action area at the top of the Role Center page is area(Creation). The following example adds an action that opens the Sales Journal page.
Example
...
addlast(Creation)
{
action("Sales Journal")
{
ApplicationArea = All;
RunObject = page "Sales Journal";
}
}
The actions in the area(Processing) control appear after the area(Creation) items.
The following example uses a group control to organize similar actions under a common parent. The group appears at the end of the action area and opens pages for processing sales documents.
Example
...
addlast(Processing)
{
group(Documents)
{
action("Sales Document Entity")
{
ApplicationArea = All;
RunObject = page "Sales Document Entity";
}
action("Posted Sales Invoices")
{
ApplicationArea = All;
RunObject = page "Posted Sales Invoices";
}
}
}
Actions in the area(Reporting) control appear last in the action area and use the default report icon. This area targets report objects. The following example opens the Customer/Item Sales report.
Example
...
addlast(Reporting)
{
action("Customer Statistics")
{
ApplicationArea = All;
RunObject = report "Customer/Item Sales";
}
}
Related information
AL Development Environment
Page Extension Object
Actions Overview
Add pages and reports to Tell Me