Hi, Readers.
The public preview for Dynamics 365 Business Central 2025 release wave 1 (BC26) is available. Learn more: Link.
I will continue to test and share some new features that I hope will be helpful.
Extend CardPageId on list and listpart pages:
Business value:
https://learn.microsoft.com/en-us/dynamics365/release-plan/2025wave1/smb/dynamics365-business-central/extend-cardpageid-list-listpart-pages?wt.mc_id=DX-MVP-5004336
Several page properties aren’t available to modify by using page extensions, mainly to avoid race conditions across multiple extensions modifying the same property. However, for some properties, we’ve received many votes on Ideas to still allow modification. One of the most popular requests is to allow extensibility of the CardPageId property on list and listpart pages, either to add a card page when existing lists don’t have that, or to replace it with a different card page. In this release we’ve added the ability to extend CardPageId.
This is also mentioned in AL Language extension changelog Version 15.0:
BCIdea Support modification of
https://marketplace.visualstudio.com/items/ms-dynamics-smb.al/changelogCardPageID
onPageExtension
s. If the property is already specified on the base page, the value in thePageExtension
will override it. If multiplePageExtension
s modify the property, the last extension to be applied will take effect.

With this wave (BC26), you can now modify CardPageId Property on list and listpart pages through a PageExtension👏👏👏.
CardPageId Property: Sets the card page that is associated with items in the current list page.
Use this property on a list page or listpart page to specify the card page that should be displayed when an end user double-clicks an item on the list page or listpart page.
For example, on the page 31 “Item List”

On the page 22 “Customer List”

PS: In BC25.5 and previous versions, this property cannot be customized.
The property ‘CardPageID’ cannot be customized. AL AL0246

So we can do two things from Business Central 2025 wave 1 (BC26).
1. Change the card page of a standard list page or listpart page.
If the property is already specified on the base page, the value in the PageExtension will override it.
Let’s look at a simple example. I created a new Customer Card page and then replaced the original one.


Great.

Test video:
Test code:
page 50101 "ZY Customer Card"
{
ApplicationArea = All;
Caption = 'ZY Customer Card';
PageType = Card;
SourceTable = Customer;
layout
{
area(Content)
{
group(General)
{
Caption = 'General';
field("No."; Rec."No.")
{
ToolTip = 'Specifies the number of the customer. The field is either filled automatically from a defined number series, or you enter the number manually because you have enabled manual number entry in the number-series setup.';
}
field(Name; Rec.Name)
{
ToolTip = 'Specifies the name of the customer.';
}
field("Name 2"; Rec."Name 2")
{
ToolTip = 'Specifies the value of the Name 2 field.', Comment = '%';
}
field("Currency Code"; Rec."Currency Code")
{
ToolTip = 'Specifies the value of the Currency Code field.', Comment = '%';
}
field("Language Code"; Rec."Language Code")
{
ToolTip = 'Specifies the value of the Language Code field.', Comment = '%';
}
field("Phone No."; Rec."Phone No.")
{
ToolTip = 'Specifies the value of the Phone No. field.', Comment = '%';
}
field(City; Rec.City)
{
ToolTip = 'Specifies the value of the City field.', Comment = '%';
}
}
}
}
}
pageextension 50112 CustomerListExt extends "Customer List"
{
CardPageID = "ZY Customer Card";
}
2. Add a card page to a standard list page or listpart page that does not have a card page
For example, add a new card page for page 4 “Payment Terms”


Great.

Test video:
Test code:
page 50101 "ZY Payment Term Card"
{
ApplicationArea = All;
Caption = 'ZY Payment Term Card';
PageType = Card;
SourceTable = "Payment Terms";
layout
{
area(Content)
{
group(General)
{
Caption = 'General';
field("Code"; Rec."Code")
{
ToolTip = 'Specifies a code to identify this set of payment terms.';
}
field("Due Date Calculation"; Rec."Due Date Calculation")
{
ToolTip = 'Specifies a formula that determines how to calculate the due date, for example, when you create an invoice.';
}
field("Discount Date Calculation"; Rec."Discount Date Calculation")
{
ToolTip = 'Specifies the date formula if the payment terms include a possible payment discount.';
}
field("Discount %"; Rec."Discount %")
{
ToolTip = 'Specifies the percentage of the invoice amount (amount including VAT is the default setting) that will constitute a possible payment discount.';
}
field(Description; Rec.Description)
{
ToolTip = 'Specifies an explanation of the payment terms.';
}
}
}
}
}
pageextension 50112 MyExtension extends "Payment Terms"
{
CardPageId = "ZY Payment Term Card";
Editable = false;
}
Give it a try!!!😁
PS:
1. Dynamics 365 Business Central: Double Click trigger on the list page???
2. If multiple PageExtensions modify the property, the last extension to be applied will take effect. As per-tenant extensions are applied after AppSource apps, this implies that any race condition across multiple AppSource apps setting the same CardPageId can be resolved in a per-tenant extension if needed, although this will seldomly happen.
END
Hope this will help.
Thanks for reading.
ZHU
コメント