Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Show field from related table in List page

Posted on by Microsoft Employee

Hi all

Pretty new to Nav development and creating my first extension. Got most of it working and now improving things. 

I have a custom list page that displays a list of sales orders based on a filter. All works great. Right now it displays the Shipping Agent Service Code, but I want it to show the description from Shipping Agent Services instead.

I know I need a table relation, but not sure how to reference the field in the related table (Shipping Agent Services)

field("Shipment Method"; "Shipping Agent Service Code")
                {
                    ApplicationArea = All;
                    CaptionML = ENU = 'Shipping Agent Service Code';
                    Editable = false;
                    TableRelation = "Shipping Agent Services";
                }
       
Could someone point me in the right direction?
Thanks
Mark

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Show field from related table in List page

    Hi Mark,

    You might want to create a flowfield as a table extension for Sales Header table to host the description of the Shipping Agent Service. The Shipping Agent Service Code is a 10 character long CODE field and as such not suitable for the description field. Then you need to add the flowfield as a field to your page extension and possibly call a Calcfields function for the new flowfield to the OnAfterGetRecord of the page extension. Not sure if the last bit is needed, haven't tested that.

    Let me know if you need help with the flowfield. Seems like have the rest figured out.

    Tero

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans