Order all order/invoice pages by date by default

IvanGarciaSubero
Member Posts: 6
Hi,
every time I enter a page like Posted Sales Invoices, Sales Invoices, Sales Orders, Purchase Orders, etc, etc. I find the list of orders/invoices ordered by No., and in the case of Sales Order there is no order established by default, that's why I always need to click on the Document Date header and order it, so I make that clic about 1000 times a day...
I need a simple way of having all those pages ordered by default by the field I'm interested on. I have been searching and taking a look to configuration, personalice, etc, and I can't find a way to get that. I have tried to create a custom view, but I can't find a way of stablishing that view as default, so I need to click it any time I enter the page, so it's the same as clicking in the header...

If there is no option, as alternative I can also program a page extension since I'm BC/AL programmer, but I'd like to make it the most scalable possible instead of having a new page extension for each page.
Any ideas?
every time I enter a page like Posted Sales Invoices, Sales Invoices, Sales Orders, Purchase Orders, etc, etc. I find the list of orders/invoices ordered by No., and in the case of Sales Order there is no order established by default, that's why I always need to click on the Document Date header and order it, so I make that clic about 1000 times a day...
I need a simple way of having all those pages ordered by default by the field I'm interested on. I have been searching and taking a look to configuration, personalice, etc, and I can't find a way to get that. I have tried to create a custom view, but I can't find a way of stablishing that view as default, so I need to click it any time I enter the page, so it's the same as clicking in the header...


If there is no option, as alternative I can also program a page extension since I'm BC/AL programmer, but I'd like to make it the most scalable possible instead of having a new page extension for each page.
Any ideas?
0
Answers
-
My solution right now is to extend each of the tables and specify each sort field in the OnOpenPage() trigger, it is tedious, any better or more scalable solution is welcome
pageextension 56226 OrderPostedPurchaseInvoices extends "Posted Purchase Invoices" { trigger OnOpenPage() begin // Tras abrir la página ordenamos por fecha descendiente Rec.SetCurrentKey("Due Date"); Rec.Ascending(false); end; } pageextension 56227 OrderPurchaseInvoices extends "Purchase Invoices" { trigger OnOpenPage() begin // Tras abrir la página ordenamos por fecha descendiente Rec.SetCurrentKey("Order Date"); Rec.Ascending(false); end; } // etcetera
0 -
[Topic moved from 'General Chat' forum to 'NAV Three Tier' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
If you are not getting the expected results, try SetView as below.
trigger OnOpenPage()
begin
Rec.SetCurrentKey("No.");
Rec.SetAscending("No.", false);
Rec.SetView(Rec.GetView());
if Rec.FindFirst() then;
end;0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions