Hello,
I have a request, to modify a page’s sub-form that currently displays the lines in the order they are entered.
I need to be able to sorted by a specific column (field). Is this a code change that needs to be done at the table, or page level?
The table source is Sales Lines, and the page is Sales Quote Subform (95)
Is there a function that would help achieve this functionality? I am still not very strong on C/ AL skills and perhaps there is a page that already does this that I am unaware of, or perhaps someone has a bit of code examples willing to share?
Any help would be really nice.
You can change the sort order of the sub-page record by keying Alt-F10, or clicking on the sub-page action icon in the top-right corner of the control. This opens a menu list that includes Sort. Click the Sort menu option, then use the drop-down list box to choose from among the existing key definitions to determine the sort order for the record. If the sort order you’re looking for isn’t in the list, then you’ll need to define a key in the source table to meet your requirements.
That is exactly what I did!
The downside is that this option is for viewing only, because default NAV functionality I think it requires default sort to be re selected when entering new line.
Correct?
If you want to change the DEFAULT sort order of the sub-page, then you need to do that using object designer. Open the sub-form page in OD, position the cursor on a blank line at the end of the control list, view properties, and edit the property SourceTableView. The existing value for the property includes a filter on document type. You’ll just be adding an additional phrase to the property value that sets the sort order and key. You can edit this property by clicking the ellipse button on the far-right of the value text box.