Skip to main content

Notifications

Community site session details

Community site session details

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

I can't pickup field County from a code lookup that refers to Post Code Table AL

(0) ShareShare
ReportReport
Posted on by
Hi,
AM trying to lookup field "county" from post code table using the code field so that after successfully picking the code field in my page the county field should populate from the post code table.
When I lookup the code field in my page, the break point sets its self on vscode on the line that's lookin up. And when I go back to BC page, my page hangs and displays a message "working on it". Below is an extract of my code.
pastedimage1599925366582v1.png
I need to pick the field county on page. Kindly assist?
  • Romryan Profile Picture
    on at
    RE: I can't pickup field County from a code lookup that refers to Post Code Table AL

    Jyotsna,

    Am new in Nav/Business Central and am open to adopt you suggestion too. Will you mind giving an example?.

  • Romryan Profile Picture
    on at
    RE: I can't pickup field County from a code lookup that refers to Post Code Table AL

    Josh,

    If a table has a composite keys as you have mentioned, how do I use code and city in get method so that I can pick the field County on a separate field after looking up the keys field(s). Am new in Busness Central/Nav.

  • Suggested answer
    Jyotsna NAV Profile Picture
    585 on at
    RE: I can't pickup field County from a code lookup that refers to Post Code Table AL

    Hi, 

    You can only GET primary keys. If you want to use other fields then SETRANGE and FINDFIRST (based on your scenario)

    Regards
    Jyotsna
    jyotsnanav.blogspot.com

    Don't forget to help the community by verifying my answer or at least like the suggestion if it did help in any way. It will let others know that the topic has a verified answer and was beneficial to you.

  • Suggested answer
    JAngle Profile Picture
    95 on at
    RE: I can't pickup field County from a code lookup that refers to Post Code Table AL

    Primary key on that table is code and city. It hangs as it doesn’t have all the data to perform the get.

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

Announcing the Engage with the Community forum!

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

🌸 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…

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 874

#2
YUN ZHU Profile Picture

YUN ZHU 829 Super User 2025 Season 1

#3
Mansi Soni Profile Picture

Mansi Soni 595

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans