Monday, 7 April 2025

Extending CardPageId on List and ListPart Pages in Business Central

In Microsoft Dynamics 365 Business Central, developers often want to customize the page that opens when a user double-clicks on a record in a list or listpart page. This is controlled by the CardPageId property. Previously, it was not possible to modify this property via pageextension.

Microsoft has enabled CardPageId extensibility in the latest release.


You can now override the CardPageId on list and listpart pages via AL pageextension objects.

  • If the base page defines a CardPageId, you can override it.
  • If multiple extensions modify it, the last applied extension wins (per-tenant extensions override AppSource ones).

Example: Extend Customer List to Use Custom Card Page

Let’s say you’ve created a new Customer Card page named "My Custom Customer Card" and you want the Customer List to open this custom card on double-click.

Here’s how you do it:

pageextension 50100 CustomerListExt extends "Customer List"

{

    CardPageId = "My Custom Customer Card";

}

That’s it!

Now when a user opens the Customer List and double-clicks on any customer, your custom card page opens instead of the standard one.




  • Race conditions: If multiple extensions set the CardPageId, the last loaded extension wins. This typically won't be a problem, but you can control precedence using a per-tenant extension.
  • Applies only to list and listpart pages.

If you attempt to set this property with a Runtime of less than 15 in app.json, you will encounter this error.