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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Display Vendor Name when I choose the vendor ID

(0) ShareShare
ReportReport
Posted on by 35

Hi everyone,

I need to fill the Name field when I select a vendor ID

How I can do it

pastedimage1681399239996v2.png

thanks

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    61,218 Super User 2026 Season 1 on at

    You can make the Name field as flowfield to show the name based on the Vendor No.

    Or you can write code in OnValidate trigger of Vendor No. field to get the vendor record and assign Name

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

    Hi company1,

    You have two options to achieve this. You can either add your logic to the OnValidate() trigger of VendorID field on the page level, or you can create a method in your table which gets the vendor name using the vendor ID, here is the code for the method

        procedure displayVendorName(): Text
        var
            vendTable: Record Vendor;
        begin
            if vendTable.Get(Rec.VendorID) then begin
                exit(vendTable.Name);
            end;
        end;

    Then, you use the displayVendorName() method in the page field as follows

                    field(VendorID; Rec.VendorID)
                    {
                        ApplicationArea = All;
                    }
                    field(PartcipantName; Rec.displayVendorName())
                    {
                        ApplicationArea = All;
                    }

    I hope this helps, let me know if you have any queries.

    Regards

  • Suggested answer
    IB-29041624-0 Profile Picture
    1,191 Moderator on at

    Is your page based on the standard vendor table or have you created your own table.

    If you have created your own table you can add a flow field to your table with the type LookUp.

    That will display the vendor name in the table even if it is not stored in your table.

    learn.microsoft.com/.../devenv-flowfields

  • Verified answer
    YUN ZHU Profile Picture
    102,031 Super User 2026 Season 1 on at

    Hi, I have mentioned several simple solutions in the following post, hoping to give you some hints.

    https://yzhums.com/22220/

    Thanks.

    ZHU

  • Verified answer
    Deekshitha Reddy Profile Picture
    219 on at

    I have used 2 tables here, So in the second table's card were I wanted to display name when id is entered. Write the code on trigger ONVALIDATE of id field. 

    field(1; studentid; Code[50])//Second Table 
            {
                DataClassification = ToBeClassified;
                trigger OnValidate()
                var
                    s1: Record Studenttable//variable of type record, from first table from where I am getting name(details) 
                begin
                    IF s1.Get(studentid) then
                        student_name := s1.studentname;
                end;
    field(2; student_name; Code[50])
            {
                DataClassification = ToBeClassified;
            }
    }
    Hope this helps.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,690 Super User 2026 Season 1

#2
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 1,091 Super User 2026 Season 1

#3
YUN ZHU Profile Picture

YUN ZHU 1,047 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans