Sort List Form by (Dynamic) button
shogan@mila.ie
Member Posts: 113
Hi all,
Good morning and hope you are well.
I have created a new list form based on the Sales List form that displays all orders outstanding (i.e. Order Status = backorder, printed, passed to credit control, etc.) I also have it automatically refreshing every 10 seconds (very nifty feature, even if I do say so myself!).
Now what I would like to do is create a button that would change the sort based on a different key, (that already exists).
I know HOW to create a button, and I think the following http://www.mibuso.com/forum/viewtopic.php?f=23&t=11831&hilit=sort+form+list is along the idea of what I want to do, but based on the programming of a button.
So the default sort applied on opening the form is "Document Type, No." and I'd like the button to change it to "Document Type", "Sell-to Customer No., "No.". I just don't know what triggers on the button I need to apply the additional code to. Sounds simple, but again I am a newbie and I just want to make sure I am following best practice.
Any help appreciated.
Thanks in advance.
Good morning and hope you are well.
I have created a new list form based on the Sales List form that displays all orders outstanding (i.e. Order Status = backorder, printed, passed to credit control, etc.) I also have it automatically refreshing every 10 seconds (very nifty feature, even if I do say so myself!).
Now what I would like to do is create a button that would change the sort based on a different key, (that already exists).
I know HOW to create a button, and I think the following http://www.mibuso.com/forum/viewtopic.php?f=23&t=11831&hilit=sort+form+list is along the idea of what I want to do, but based on the programming of a button.
So the default sort applied on opening the form is "Document Type, No." and I'd like the button to change it to "Document Type", "Sell-to Customer No., "No.". I just don't know what triggers on the button I need to apply the additional code to. Sounds simple, but again I am a newbie and I just want to make sure I am following best practice.
Any help appreciated.
Thanks in advance.
0
Comments
-
Why do you want to do it via Code?
You can simply click Shift+F8 and select Key and Order..0 -
Hi Mohana,
Request from Financial Director and to be given to Credit Controller.
What I hope to do it make it dynamic - actually have one button overlay the other - one sort hides the button to change the sort, and the underlaid button restores it.
I'm looking to toggle between he two sorts; here, the company prefers visual cues. I think it lends itself to clarity.
And also, explaining keys and sorts to people here generally doesn't work well. It's a "spoon-feeding" exercise, I know. Usually resorting means trying to remember the original key if you want to get back to the original screen etc.
Trust me, I have plenty of reasons "why" - and for me as a learning exercise.
Thanks!0 -
Well, if you want to go ahead with coding then you need to write the code under PnPush trigger of Button..0
-
Thanks Mohana.
I'll give it a shot and see what happens.
If I run into difficulties, I'll get back on here... but I think I have enough to start with.0 -
Sorted.
And a lot easier than I thought.SETCURRENTKEY("Document Type","Sell-to Customer No.","No.");
Then another button:SETCURRENTKEY("Document Type","No.");- this key is the default key.
Even managed to overlap one button on top of the other, and pseudo-toggle it:CurrForm.btnSortCustNo.VISIBLE := FALSE;
... and TRUE; where appropriate!
Thanks for the heads up!
Case closed.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
