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
please verify the answer(s) which helped you. thx.
Nm, I had some code in the table that was causing a conflict. thank you for your help.
I also forgot to mention, that my No. field is an integer with auto number.
Do I have to make a function for this or will it insert with just the key ?
so I have 2 in the second table. No., OnCall No., first table or main page just has No.
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.
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.
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.
Sohail Ahmed
2
mmv
2
Amol Salvi
2