Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Nav 2016 Form/Sub Form

Posted on by Microsoft Employee

I have a question on how to get records from a form to a sub form. I have 2 tables, 1 header, 1 lines and 2 forms. 1 main 1 list part. My main form has the item no. and the sub form has details on this item. I am new to Nav and having troubles finding examples of how to insert the record from the main form/table into the sub form/table. Any help would be appreciated.

*This post is locked for comments

  • keoma Profile Picture
    keoma 32,675 on at
    RE: Nav 2016 Form/Sub Form

    please verify the answer(s) which helped you. thx.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Nav 2016 Form/Sub Form

    Nm, I had some code in the table that was causing a conflict. thank you for your help.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Nav 2016 Form/Sub Form

    I also forgot to mention, that my No. field is an integer with auto number.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Nav 2016 Form/Sub Form

    Do I have to make a function for this or will it insert with just the key ?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Nav 2016 Form/Sub Form

    so I have 2 in the second table. No., OnCall No., first table or main page just has No.

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Nav 2016 Form/Sub Form

    Is the Item No. is the key your list part table and is that used for sub-page link ? What is the primary key of the header and line table ?

    The message you are getting is not an error it is just a warning message. looks like your filters are not setup properly.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Nav 2016 Form/Sub Form

    Thanks for your reply. I did have the subpagelink setup. I didn't have the the key link. When I open the form.t he list part does filter as it did before. the only part that doesn't work is the number of the item on the list part does't fill with the number on the main form. I get a different error than I did before. the error is the view is filtered and the entry is outside the filter.

  • Verified answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: Nav 2016 Form/Sub Form

    best you start with page 42 sales order and page 46 sales order subform. there you have one typical example for page/sub page in newer nav versions. the sub page is embedded in the main page as page part. the linkage is done by page propety SubPageLink in the main page, when you select the page part line "SalesLines": Document No.=FIELD(No.).

    the key of the sub page's base table should contain the key of the main table. in your case "item no.". additional you'll need a field "line no." as part of the sub table's key.

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans