Hi ,
I created a custom table called Bank Details with Table ID 90000, along with a List Page and Card Page in Business Central.
In the Card Page, I added a Dimensions action button to open the Default Dimensions page.
I used the following code:
action(TestAction)
{
ApplicationArea = Dimensions;
Caption = 'Dimensions';
Image = Dimensions;
RunObject = Page "Default Dimensions";
RunPageLink = "Table ID" = const(90000),
"No." = field("Bank Name");
ShortCutKey = 'Alt+D';
ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to sales and purchase documents to distribute costs and analyze transaction history.';
}
But when I click the Dimensions button, I get the following error:
Table ID must not be 90000 in Default Dimension
Table ID='90000', No.='BANK 1', Dimension Code=''
I also tried using RunObject and RunPageLink, but the same issue occurs.
How can I correctly open and use the Default Dimensions page for a custom table in Business Central?
Below is the reference code for my custom Table and Card Page.
table 90000 "Bank Details"
{
Caption = 'Bank Details';
DataClassification = ToBeClassified;
fields
{
field(1; "Bank Name"; Text[100])
{
Caption = 'Bank Name';
}
field(2; "Bank IFSC Code"; Code[20])
{
Caption = 'Bank IFSC Code';
}
field(3; "Bank Branch"; Text[100])
{
Caption = 'Bank Branch';
}
field(4; "Balance"; Decimal)
{
Caption = 'Balance';
}
}
keys
{
key(PK; "Bank Name")
{
Clustered = true;
}
}
}
page 90001 "Bank Details Card"
{
PageType = Card;
SourceTable = "Bank Details";
ApplicationArea = All;
Caption = 'Bank Details Card';
layout
{
area(Content)
{
group(General)
{
field("Bank Name"; Rec."Bank Name")
{
ApplicationArea = All;
}
field("Bank IFSC Code"; Rec."Bank IFSC Code")
{
ApplicationArea = All;
}
field("Bank Branch"; Rec."Bank Branch")
{
ApplicationArea = All;
}
field(Balance; Rec.Balance)
{
ApplicationArea = All;
}
}
}
}
actions
{
area(Processing)
{
action(TestAction)
{
AccessByPermission = TableData "Bank Details" = R;
ApplicationArea = Dimensions;
Caption = 'Dimensions';
Image = Dimensions;
RunObject = Page "Default Dimensions";
RunPageLink = "Table ID" = const(90000),
"No." = field("Bank Name");
ShortCutKey = 'Alt+D';
ToolTip = 'View or edit dimensions, such as area, project, or department, that you can assign to sales and purchase documents to distribute costs and analyze transaction history.';
}
}
}
}
Thanks,