In today's article, we will ;
- create a card page,
- Create a list page.
- Link the two using CardPageID property
- Add a menu item to the navigation pane of Order processor Role center
I recommend you create a new file "SeminarPages.al"
Paste the following code
page 50030 "Seminar Room Card"
{
PageType = Card;
SourceTable = "Seminar Room";
layout
{
area(content)
{
group(General)//Pass the group name
{
field(Code;"Code")
{
}
field(Name;"Name")
{
}
field(Address;Address)
{
}
field("Address 2";"Address 2")
{
}
field(Allocation;Allocation)
{
}
field("Internal/External";"Internal/External")
{
}
field("Maximum Participants";"Maximum Participants")
{
}
group("Communications")
{
field(Contact;Contact)
{
}
field("Contact No.";"Contact No.")
{
}
field("Country/Region Code";"Country/Region Code")
{
}
field(City;City)
{
}
field(Comment;Comment)
{
}
field("E-Mail";"E-Mail")
{
}
field("Fax No.";"Fax No.")
{
}
field("home Page";"home Page")
{
}
field("Post Code";"Post Code")
{
}
}
}
}
}
actions
{
area(processing)
{
action(ActionName)
{
trigger OnAction();
begin
end;
}
}
}
var
myInt : Integer;
}
page 50035 "Seminar Room List"
{
PageType = List;
CardPageId = "Seminar Room Card";
SourceTable = "Seminar Room";
layout
{
area(content)
{
repeater(Group)
{
field(Code;"Code")
{
}
field(Name;"Name")
{
}
field(Address;Address)
{
}
field("Address 2";"Address 2")
{
}
field(Allocation;Allocation)
{
}
field("Internal/External";"Internal/External")
{
}
field("Maximum Participants";"Maximum Participants")
{
}
field(Contact;Contact)
{
}
field("Contact No.";"Contact No.")
{
}
field("Country/Region Code";"Country/Region Code")
{
}
field(City;City)
{
}
field(Comment;Comment)
{
}
field("E-Mail";"E-Mail")
{
}
field("Fax No.";"Fax No.")
{
}
field("home Page";"home Page")
{
}
field("Post Code";"Post Code")
{
}
}
}
area(factboxes)
{
}
}
actions
{
area(processing)
{
action(ActionName)
{
trigger OnAction();
begin
end;
}
}
}
}
pageextension 50040 "Order Processor Extension" extends "Order Processor Role Center"
{
layout
{
// Add changes to page layout here
}
actions
{
// Add changes to page actions here
addlast(Embedding)//Adding an action to our Role center Navigation pane
{
action("Seminar Rooms")// The new navigation menu item
{
RunObject = page "Seminar Room List";
}
}
}
var
myInt : Integer;
}
Save and publish.
Restart your Dynamics NAV instance.
There you find a new navigation menu item.
Good luck