Hi, Readers.
In Dynamics 365 Business Central, pages are the main way to display and organize data. A page is defined in code as an object composed of controls, properties, actions, and triggers.
We have previously discussed how to export all fields/controls in all pages in Dynamics 365 Business Central (Page Control Field).
![](https://yzhums.com/wp-content/uploads/2022/12/Snipaste_2022-12-20_10-44-54-1024x558.png)
In this post, I would like to talk about a similar topic, how to export all actions in all pages.
Actions are displayed at the top of each page, referred to as the action bar. More details: Actions overview
For example,
Actions in page 22 “Customer List”:
![](https://yzhums.com/wp-content/uploads/2023/05/image-188-1024x169.png)
In base application:
![](https://yzhums.com/wp-content/uploads/2023/05/image-190-1024x649.png)
![](https://yzhums.com/wp-content/uploads/2023/05/image-189.png)
It’s not difficult this time, we will use table 2000000143 “Page Action”, but it requires some developer help.
![](https://yzhums.com/wp-content/uploads/2023/05/image-191.png)
All fields:
![](https://yzhums.com/wp-content/uploads/2023/05/image-192.png)
As you might know, we can add the table=<TableID>
parameter to the client’s address (URL), replacing <TableID>
with the ID of the table that we want to view. But please note that this table cannot be opened by this way.
![](https://yzhums.com/wp-content/uploads/2023/05/image-193.png)
Your license does not grant you the following permissions on TableData Page Action: Read.
![](https://yzhums.com/wp-content/uploads/2023/05/image-194-1024x532.png)
Fortunately, we only need to create a list page to see the values inside the table.
![](https://yzhums.com/wp-content/uploads/2023/05/image-195.png)
Source Code:
page 50011 "ZY Page Actions"
{
ApplicationArea = All;
Caption = 'Page Actions';
PageType = List;
SourceTable = "Page Action";
UsageCategory = Lists;
layout
{
area(content)
{
repeater(General)
{
field("Page ID"; Rec."Page ID")
{
ToolTip = 'Specifies the value of the Page ID field.';
}
field("Action Index"; Rec."Action Index")
{
ToolTip = 'Specifies the value of the Action Index field.';
}
field("Action ID"; Rec."Action ID")
{
ToolTip = 'Specifies the value of the Action ID field.';
}
field(Indentation; Rec.Indentation)
{
ToolTip = 'Specifies the value of the Indentation field.';
}
field("Parent Action ID"; Rec."Parent Action ID")
{
ToolTip = 'Specifies the value of the Parent Action ID field.';
}
field("Action Type"; Rec."Action Type")
{
ToolTip = 'Specifies the value of the Action Type field.';
}
field("Action Subtype"; Rec."Action Subtype")
{
ToolTip = 'Specifies the value of the Action Subtype field.';
}
field(Name; Rec.Name)
{
ToolTip = 'Specifies the value of the Name field.';
}
field(Caption; Rec.Caption)
{
ToolTip = 'Specifies the value of the Caption field.';
}
field(ToolTip1; Rec.ToolTip1)
{
ToolTip = 'Specifies the value of the ToolTip1 field.';
}
field(ToolTip2; Rec.ToolTip2)
{
ToolTip = 'Specifies the value of the ToolTip2 field.';
}
field(ToolTip3; Rec.ToolTip3)
{
ToolTip = 'Specifies the value of the ToolTip3 field.';
}
field(ToolTip4; Rec.ToolTip4)
{
ToolTip = 'Specifies the value of the ToolTip4 field.';
}
field(Promoted; Rec.Promoted)
{
ToolTip = 'Specifies the value of the Promoted field.';
}
field(RunObjectType; Rec.RunObjectType)
{
ToolTip = 'Specifies the value of the RunObjectType field.';
}
field(RunObjectID; Rec.RunObjectID)
{
ToolTip = 'Specifies the value of the RunObjectID field.';
}
field(RunPageMode; Rec.RunPageMode)
{
ToolTip = 'Specifies the value of the RunPageMode field.';
}
field(RunSourceTable; Rec.RunSourceTable)
{
ToolTip = 'Specifies the value of the RunSourceTable field.';
}
field(ApplicationArea; Rec.ApplicationArea)
{
ToolTip = 'Specifies the value of the ApplicationArea field.';
}
}
}
}
}
Page Actions page:
![](https://yzhums.com/wp-content/uploads/2023/05/image-196-1024x532.png)
Let’s do a simple test.
Filter Page ID to 22 (Customer List)
![](https://yzhums.com/wp-content/uploads/2023/05/image-197-1024x532.png)
You can find the actions and the order, which are the same as defined in 22 Page “Customer List”. (This table are sorted by Page ID and Action Index)
![](https://yzhums.com/wp-content/uploads/2023/05/Snipaste_2023-05-29_13-33-29-1024x545.png)
Then we can use the Open in Excel feature to easily export these data.
![](https://yzhums.com/wp-content/uploads/2023/05/image-198-1024x578.png)
Very easy, isn’t it? Give it a try!!!😁
PS: Using this method you can also export some useful information as follows
ToolTip: If the length is exceeded it will be displayed in ToolTip2, ToolTi3, and ToolTi4
![](https://yzhums.com/wp-content/uploads/2023/05/image-199-1024x578.png)
RunObjectType, RunObjectID, RunObjectID, RunSourceTable, and ApplicationArea.
![](https://yzhums.com/wp-content/uploads/2023/05/image-200-1024x578.png)
You can get this information in your extension if needed.
![](https://yzhums.com/wp-content/uploads/2023/05/image-202-1024x278.png)
![](https://yzhums.com/wp-content/uploads/2023/05/image-201-1024x578.png)
END
Hope this will help.
Thanks for reading.
ZHU
コメント