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

Open page after clicking field value

(0) ShareShare
ReportReport
Posted on by 67

Hi!

I want to open form, with specific data after clicking a field on my page.

Just like on Customer List (22, List), when I click value in column "No." - customer number. I am redirected to Customer Card (21, Card) with full customer data. 

I have 2 tables:

ParentTable, with unique field "Parent No."
ChildTable, with not unique field "Parent No.".

ChildTable have relation like this:

field(1; "Parent No."; Integer)
{
    Caption = 'Parent No.';
    DataClassification = ToBeClassified;
    TableRelation = ParentTable."Parent No.";
}


I have also 2 pages

First page, that's show list of all parents
Second page, that's show list of all child which match passed "Parent No.".

How should I develop this? Any solutions? :)

Best Regards!

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    You need to define a lookup page where you want to look at related data:

    learn.microsoft.com/.../devenv-lookuppageid-property

    Look at how it is done in the standard code f.ex. on the customer table:

    pastedimage1672234266303v1.png

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    You also might want to use the card page ID property to open a card page where needed.

    learn.microsoft.com/.../devenv-cardpageid-property

  • Alzack18 Profile Picture
    67 on at

    Hi Inge! Thank you for response :)

    I added to my childTable property:

    LookupPageId = [pageId]

    and to my parentPage on field "Parent No." property:

    LookupPageId = [childPageId]

    After I click on "Parent No." value i get small box, with related lines (i don't need this at all). I can click "Open full list" to open childPage with full data. The problem is that when the entire page is opened, all the records contained in the childTable appear, not just those with the corresponding Parent No.

    image_5F00_2022_2D00_12_2D00_28_5F00_155009933.png
    How to fix this? Can I set range on 'Parent No.'? In addition, disabling the appearance of this small window would also be useful. I want to show only full childPage with corresponding "Parent No.".

    Best Regards!

  • Verified answer
    YUN ZHU Profile Picture
    95,649 Super User 2025 Season 2 on at

    Hi, just adding some info for this small box. Hope this can give you some hints.

    Refreshed peek experience on related records

    https://yzhums.com/18357/

    Hope this helps.

    Thanks.

    ZHU

  • Alzack18 Profile Picture
    67 on at

    yzhums thank you for response! :)

    Your advice is very helpful. However, I am more interested in a solution using "DrillDown" to show the whole page with full information. I'm currently struggling with the problem of limiting the displayed data to those linked after "Parent No.".

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at
    [quote user="Alzack18"]

    Hi Inge! Thank you for response :)

    I added to my childTable property:

    LookupPageId = [pageId]

    and to my parentPage on field "Parent No." property:

    LookupPageId = [childPageId]

    After I click on "Parent No." value i get small box, with related lines (i don't need this at all). I can click "Open full list" to open childPage with full data. The problem is that when the entire page is opened, all the records contained in the childTable appear, not just those with the corresponding Parent No.

    image_5F00_2022_2D00_12_2D00_28_5F00_155009933.png
    How to fix this? Can I set range on 'Parent No.'? In addition, disabling the appearance of this small window would also be useful. I want to show only full childPage with corresponding "Parent No.".

    Best Regards!

    [/quote]

    That should not be nessesary if you have designed the correct relations between your tables.

    Maybe you can share more of your code so it is easier to assist you. If you do not want to share your code here then you can send me an e-mail or an message.

  • Alzack18 Profile Picture
    67 on at

    Problem solved :)

    I used OnDrillDown() trigger on my page.

    field("Parent No."; Rec."Parent No.")
    {
        ApplicationArea = All;
    
        trigger OnDrillDown()
        var
            ChildTablePage: Page ChildTablePage;
            ChildTableRecord: Record ChildTable;
        begin
            ChildTableRecord.SetRange(ChildTableRecord."Parent No.", Rec."Parent No.");
            ChildTablePage.SetTableView(ChildTableRecord);
            ChildTablePage.Run();
        end;
    }


    Thank you all for help.
    Best Regards!

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 2,577

#2
YUN ZHU Profile Picture

YUN ZHU 888 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 778 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans