Skip to main content
Community site session details

Community site session details

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

Change lookup fields default value to non-primary key

(0) ShareShare
ReportReport
Posted on by

I've created a new table named 'Jurisdiction', and on my existing Job card I've added a field that is a lookup of Jurisidictions. How can I set this field to display the 'name' value of the selected record instead of the 'ID' value which is currently the primary key of the Jurisdiction table?

pastedimage1643411767335v1.png

Here is the source of my lookup field:

        field(50101; Jurisdiction; Code[100])
        {
            DataClassification = ToBeClassified;
            Caption = 'Jurisdiction';
            TableRelation = Jurisdictions.ID;
        }

And here's the source of my new Jurisdictions table:

table 50101 Jurisdictions
{
    DataClassification = ToBeClassified;

    fields
    {
        field(1; ID; Integer)
        {
            DataClassification = ToBeClassified;
            AutoIncrement = true;
        }
        field(2; Name; Text[250])
        {
            DataClassification = ToBeClassified;
            Caption = 'Name';
        }
    }

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

  • Suggested answer
    JAngle Profile Picture
    95 on at
    RE: Change lookup fields default value to non-primary key

    This might help: community.dynamics.com/.../modify-field-displayed-value

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans