Nav 2009 R2
We would like to change the default sort order for a table - in our case Vendor Ledger Entry's to be newest on top, how do we do this? Posting Date is a Key, but at the moment the page defaults to Entry No A to Z, if I go to customise this page & change arrange by to be Posting Date Z to A it does not change anything, can we change the default Sort? I can change the sort when in the page, but as soon as I come out & then go back in the default is back.
*This post is locked for comments
add following code
in a list form: trigger onopenform
in a list page: trigger onopenpage
if findfirst then;
result: the form/page always opens with the first top row selected.
You will need a developer license for this.
IF FINDFIRST THEN;
will set your cursor to the first record, as per the current key and sort order.
-Yogesh Kulkarni
Please verify, if you find answer helpful.
Hi, a couple of questions, does this require a developers license, as I do not have one. Secondly we are not inserting any records, just opening page 29 to view the entries, this talks about opening forms which we are not doing?
Please check if this post from Suresh helps you.
http://www.navisionworld.com/2016/12/move-cursor-to-first-record-on-nav-form.html
-Yogesh Kulkarni
Please verify, if you find answer helpful.
As said we have the page sorted with newest at the top, BUT, when we open this page, the row that is selected first of all is the oldest which can be several pages down, what we want to happen when we open the page view is to have the newest record at the top (as it currently is) & then this row selected/highlighted so the user can see the most recent first without have to move around the pages
Thanks
Ian,
To create a secondary key, you must have a developer license.
But in NAV 2009 on the Action Panel there is one button "Sort" which will show you list of all the active keys for the base table of the Form.
Check whether that helps you.
-Yogesh Kulkarni
Please verify, if you find answer helpful.
Hi, no I never managed to change this sort order, if anyone knows without a developers licence, please let me know
Hi Ian,
After two years, I hope you found out what the solution to your sorting problem is?
Because I have the same issue, default sorting is not the problem, but the selection is still the oldest one on the lowest part of the screen.
So the users still have to scroll to the top of the page.
Did you manage to select the top record of the page, combined with the default selection change?
Thanks for the information.
--edit--
Doing the job is changing the OnOpenPage propertie code, but for doing this you need a developer key?
Hello again, whilst this has worked to a point, we have now found that when opening the list view, it is sorted by posting date as expected, BUT, the row that is selected is still the oldest row, so when the entrys go over one page you only see the oldest first as the selected row is the last (oldest) row, is there a way for the page to open & be on (selected)(highlighted) the most recent row by posting date rather than the last?
Hope you follow this?
As Jonathan said edit the page 29 in the development environment and then go to the empty line of the page and then click on properties. In the property window you can see a field called "SourceTableView"
In the right side of the SourceTableView click on the drildown icon and it will open a small window which will allow you to select the keys for the page. In that select your key and then set the ascending or descending order as you want. Then compile the page and save it.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156