# Working with CardPart pages
A CardPart page is a type of page part that you embed in another page to display more data relevant to the page that hosts it. It can display the data in the form of almost any page control, such as fields, cue tiles, images, or control add-ins. You can also define actions to operate on the card part page.
You can place a card part in Role Centers, in the FactBox and content area of other pages, or in a tabular step in a wizard. Depending on the type of the hosting page, a card part is subject to different design constraints, which determine its position and dimensions. See devenv-designing-parts#design-considerations.
## Creating a card part
To create a card part, create a page object, set the properties/devenv-pagetype-property to CardPart, and specify the source table. You can nest different controls inside the `area(Content)` control depending on how you want to display the data. You can specify the following controls.
Control|Definition
field|Defines a field. It can also be used to display an image.
cuegroup|Defines a group of cue tiles. See Designing cues<devenv-cues-action-tiles#CueDesign>.
usercontrol|Defines a control add-in. See Control add-in object<devenv-control-addin-object>.
## Adding a card part to a page
To place a card part in a page, add a part control to the hosting page and associate it with the card part page object. Define more properties. These properties only apply to the container of the card part, whose functionality is independent from the hosting page.
## Example
The following code sample shows how to create a CardPart page, `"Customer Sales History"`, and how to integrate it in the FactBox area of the card page `"Customer Card"`.
```al
page 50101 "Customer Sales History"
{
    PageType = CardPart;
    SourceTable = Customer;

    layout
    {
        area(Content)
        {
            // Display data as cue tiles
            cuegroup(Overview)
            {
                field("No. of Quotes"; "No. of Quotes")
                {
                    ApplicationArea = All;
                    // Make the cue interactive
                    DrillDownPageID = "Sales Quotes";
                }
                field("No. of Orders"; "No. of Orders")
                {
                    ApplicationArea = All;
                    DrillDownPageID = "Sales Order List";
                }
                field("No. of Invoices"; "No. of Invoices")
                {
                    ApplicationArea = All;
                    DrillDownPageID = "Sales Invoice List";
                }
            }
        }
    }
}

page 50102 "Customer Card"
{
    PageType = Card;
    SourceTable = Customer;

    layout
    {
        area(Content)
        {
            group(General)
            {
                field("No."; "No.")
                {
                    ApplicationArea = All;
                }
                field(Name; Name)
                {
                    ApplicationArea = All;
                }

            }
        }

        // Display the card part in the Factbox area
        area(FactBoxes)
        {
            part("Customer Sales History"; "Customer Sales History")
            {
                // Filter on the sales history that relate to the customer in the card page.
                SubPageLink = "No." = FIELD("No.");
            }
        }
    }
}
```
## Related information
Page parts overview<devenv-designing-parts>
devenv-page-types-and-layouts
devenv-page-object
Page extension object<devenv-page-ext-object>
devenv-adding-a-factbox-to-page
ListPart pages<devenv-designing-listparts>
AL development environment<devenv-reference-overview>
Use Designer<devenv-inclient-designer>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-designing-cardparts, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/devenv-designing-cardparts/
