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

Community site session details

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

AL Extension: new Table related to Customer Table / HowTo

(0) ShareShare
ReportReport
Posted on by 69

Hi there
I added a new table which should be related to the customer table . that works. 

I can add a customer into the new table via dropdown / lookup into the customer table. but since normal employees usually refer more to names than numbers, I
want to add the Customer Name field as well and fill that out automatically when the customer number ffrom the selct dropdown (related field) is chosen. 
I would love to have only one editable field (Customer name or number) modifiable and the rest gest auto-filled from the customer data table. 


how would I go about that ? 

thanks in advance

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    60,985 Super User 2025 Season 2 on at
    RE: AL Extension: new Table related to Customer Table / HowTo

    You can check Table 36 - "Sell-to Customer Name OnValidate trigger code to get the Customer No. from name

    Validate("Sell-to Customer No.", Customer.GetCustNo("Sell-to Customer Name"));

    pastedimage1673782000060v1.png

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,083 Moderator on at
    RE: AL Extension: new Table related to Customer Table / HowTo

    In your new table you can create a flowfield that displays the name of the customer you have picked.

    Use a flowfield of type lookup.

    Use that method your new table will always display the updated customer name even if it is changed on the customer table. You also save db space by not saving duplicate data in two tables.

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

  • Suggested answer
    YUN ZHU Profile Picture
    94,541 Super User 2025 Season 2 on at
    RE: AL Extension: new Table related to Customer Table / HowTo

    Hi, hope the following helps.

    Using flowfield:

    https://yzhums.com/5802/

    Using Lookup, Drop-Down, or Option list

    https://yzhums.com/5985/

    Using TableRelation Property:

    https://yzhums.com/22220/

    Thanks.

    ZHU

  • Verified answer
    LDE Profile Picture
    69 on at
    RE: AL Extension: new Table related to Customer Table / HowTo

    thank you. works perfectly.

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,106

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,291 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 2,010 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans