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

New on the Table Relation LOOKUP page?

(0) ShareShare
ReportReport
Posted on by 358

New.PNG

I created my own table, extended the Customer Table to give Table Relation to those fields. Then on Card and had my table's field there. However, how do I have the New button so that once this page is opened which is a list page, a user can create a new record. Right now clicking on 'Select from full List' opens it without the option to create new. There is no button of a list page at all. Here is my code;

table 50131 "Sector"
{
    DataClassification = ToBeClassified;

    fields
    {
        field(50000; "Code"; Code[20])
        {
            DataClassification = ToBeClassified;

        }
        field(50001; "Description"; Text[50])
        {
            DataClassification = ToBeClassified;
        }
    }

    keys
    {
        key(PK; Code)
        {
            Clustered = true;
        }
    }

    var
        myInt: Integer;

    trigger OnInsert()
    begin

    end;

    trigger OnModify()
    begin

    end;

    trigger OnDelete()
    begin

    end;

    trigger OnRename()
    begin

    end;

}

tableextension 50121 "Customer Table Ext" extends Customer
{
    fields
    {
        // Add changes to table fields here
        field(50001; "Customer Sector"; Code[20])
        {
            TableRelation = Sector;
        }
    }

    var
        myInt: Integer;
}

pageextension 50122 "Customer Card Ext" extends "Customer Card"
{
    layout
    {
        // Add changes to page layout here
        addafter("Disable Search by Name")
        {
            field(recCategory; recCategory.Code)
            {
                ApplicationArea = All;
                TableRelation = Sector;
            }
        }

    }

    actions
    {
        // Add changes to page actions here
    }

    var
        recCategory: Record Sector;
}

  • patrickwantenaar Profile Picture
    45 on at
    RE: New on the Table Relation LOOKUP page?

    The reply below from Former Member worked for me.

    i.e. You have to define LookupPageID property After DataClassification property on sector table

    LookupPageID = "Sector List";

  • Suggested answer
    patrickwantenaar Profile Picture
    45 on at
    RE: New on the Table Relation LOOKUP page?

    This answer worked for me.

  • Suggested answer
    Olister Rumao Profile Picture
    3,959 on at
    RE: New on the Table Relation LOOKUP page?

    Hi Mesam,

    You can use InsertAllowed property on the page to let you see the New button on the page.

    Although when your opening the page in Lookup mode it shouldn't allow you to insert any record.

    What you can try is create Table relation where I think you will get the New button.

    Hope this helps

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: New on the Table Relation LOOKUP page?

    Hii,

    For the above requirement

    1. First Create List Page of Sector Table.

    2. u have to fill LookupPageID(List page ID with same base table) Property of sector table.

    e.g.

    You have to define LookupPageID property After DataClassification property on sector table

    LookupPageID = "Sector List";

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
YUN ZHU Profile Picture

YUN ZHU 374 Super User 2025 Season 1

#2
Mansi Soni Profile Picture

Mansi Soni 247

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 231 Most Valuable Professional

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans