web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Drilldown to a specific record

(0) ShareShare
ReportReport
Posted on by 15

BC Experts,

I'm attempting to build out a module where we track profitability of "projects", which include multiple purchase orders and sales orders. I am building it similar to how sales headers and sales lines work, with a "Project" Table and a "ProjectLines" table.

The "Project" table has a page of type List, where I can see the project number, salesperson, customer #, etc.. I have the "ProjectNumber" field set with DrillDownPageID property set to my "ProjectCard" Page. However, when I have multiple projects, clicking on any drilldown field will always lead me to the first record of that type!

For example below, clicking the projectnumber "100456" still leads me to the card page for the "100123" project number. Please see below for my project page Code as well as a screenshot.

page 50102 Projects
{
    PageType = List;
    ApplicationArea = All;
    UsageCategory = Lists;
    SourceTable = projecttable;

    layout
    {
        area(Content)
        {
            repeater(General)
            {
                field(ProjectNumber1; Rec.ProjectNumber)
                {
                    ApplicationArea = All;
                    DrillDownPageId = projectcard;
                }
            } //multiple fields are defined below and removed for clarity
        }
    }
}
Any advice is appreciated; I suspect I'm not setting a filter correctly but have been unable to find good tutorials outside of official documentation and Erik Hougaard's videos.
I have the same question (0)
  • Suggested answer
    Govinda Kumar Profile Picture
    2,304 Moderator on at

    I'm sorry for any confusion what do you mean by building it similar to what we have in the sales header and lines? the best practice is to create a list page and a card page for any datasource.. the list page displays a list of records, and when you select a record, it takes you to the corresponding card page in that case, you don't need to add a specific "drill down" property you can simply use the same data source for both the list page and the card page..

  • 1239875612039 Profile Picture
    15 on at

    Govinda,

    Thanks for your response! I have a list page and card page for my "ProjectsTable" Table. They are both utilizing the source table of "ProjectTable". However, if I remove the "DrilldownpageID" from the projectlist page, I cannot click on the Project number to bring me onto the card view.

    Here is a snippet of my List Page 

    page 50102 Projects
    {
        PageType = List;
        ApplicationArea = All;
        UsageCategory = Lists;
        SourceTable = projecttable;
    
        layout
        {
            area(Content)
            {
                repeater(General)
                {
                    field(ProjectNumber; Rec.ProjectNumber)
                    {
                        ApplicationArea = All;
                        //This is where my DrillDownpageID used to be
                        
                    } //there are more fields after this not shown here
                }
            }
        }
    }

    And here is my Project Card Page

    page 50100 ProjectCard
    {
        Caption = 'Billing Lead Sheet';
        PageType = Card;
        ApplicationArea = All;
        UsageCategory = Documents;
        SourceTable = projecttable;
        Editable = true;
    
        layout
        {
            area(Content)
            {
                group("General Information")
                {
                    field(ProjectNumber; Rec.ProjectNumber)
                    {
                        ApplicationArea = All;
                    } //more fields exist that are not shown
                }
            }
        }
    }

    Snippet (I cannot click on "100123" or "100456"):

    Please let me know what I'm doing wrong..

    Thanks!

  • Verified answer
    Govinda Kumar Profile Picture
    2,304 Moderator on at

    Try adding card page id in your list page..

    page 50102 Projects
    {
        PageType = List;
        ApplicationArea = All;
        UsageCategory = Lists;
        SourceTable = projecttable;
        
        CardPageId = ProjectCard;
    
    
        layout
        {
            area(Content)
            {
                repeater(General)
                {
                    field(ProjectNumber; Rec.ProjectNumber)
                    {
                        ApplicationArea = All;
                        //This is where my DrillDownpageID used to be
                        
                    } //there are more fields after this not shown here
                }
            }
        }
    }
    
    
    
    
    page 50100 ProjectCard
    {
        Caption = 'Billing Lead Sheet';
        PageType = Card;
        ApplicationArea = All;
        UsageCategory = Documents;
        SourceTable = projecttable;
        Editable = true;
    
        layout
        {
            area(Content)
            {
                group("General Information")
                {
                    field(ProjectNumber; Rec.ProjectNumber)
                    {
                        ApplicationArea = All;
                    } //more fields exist that are not shown
                }
            }
        }
    }

  • 1239875612039 Profile Picture
    15 on at

    I cannot believe it was so simple; thank you!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,175

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,476 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,435 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans