Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

Drilldown to a specific record

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.
  • 1239875612039 Profile Picture
    1239875612039 15 on at
    RE: Drilldown to a specific record

    I cannot believe it was so simple; thank you!

  • Verified answer
    Govinda Kumar Profile Picture
    Govinda Kumar 2,203 Super User 2024 Season 1 on at
    RE: Drilldown to a specific record

    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
    1239875612039 15 on at
    RE: Drilldown to a specific record

    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!

  • Suggested answer
    Govinda Kumar Profile Picture
    Govinda Kumar 2,203 Super User 2024 Season 1 on at
    RE: Drilldown to a specific record

    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..

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,219 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans