Specify key for flowfield
Fommo
Member Posts: 138
Hi there
I feel kinda stupid, but I can't figure this out.
On the Item card in NAV 4.0SP3 I need to specify the key used for the inventory field. The number is correct, but when the user drills down to the entries behind it gets sorted in the wrong order. The customer wants them to be sorted in chronological order using the database key "Item No., Entry No.".
How can I specify this? There is no property like RunFormView that allows me to specify sorting key.
I know that one possibility is to change primary key, but I guess that would result in a lot of performance issues in other areas depending on the current standard primary key.
I feel kinda stupid, but I can't figure this out.
On the Item card in NAV 4.0SP3 I need to specify the key used for the inventory field. The number is correct, but when the user drills down to the entries behind it gets sorted in the wrong order. The customer wants them to be sorted in chronological order using the database key "Item No., Entry No.".
How can I specify this? There is no property like RunFormView that allows me to specify sorting key.
I know that one possibility is to change primary key, but I guess that would result in a lot of performance issues in other areas depending on the current standard primary key.
0
Comments
-
You can modify the sorting on the targe form. if you design the form that you drill into you can then set the SourceTableView property. This should control the sorting for you.
IanRegards
Ian0 -
Ian_Piddington wrote:You can modify the sorting on the targe form. if you design the form that you drill into you can then set the SourceTableView property. This should control the sorting for you.
Ian
True, I've done that. The problem is that if I specify the key on form Item Ledger Entries I will get serious performance problem when I for example want to view Item Ledger Entries from a production order since it will override the sorting parameter in the call from Production Order card.
Of course I can copy the form and do a special form just for the item card, but I thought it should be possible to specify it in the call to the form. Maybe it's not then. :roll:0 -
YOU NEVER EVER _EVER_ set fixed sorting order for drill down form! EVER!
what you can do however, is press F9 on Inventory field on Item form, and write your own drill down trigger, to filter Item Ledger Entries, set custom sort order and show default drill down form.
like:ItemLedgEntry.RESET; ItemLedgEntry.SETCURRENTKEY("Item No.", "Entry No."); // you have to have such key, but remember that creating a key in ledger table just for sorting purposes might be an overkill ItemLedgEntry.SETRANGE("Item No.", "No."); FORM.RUN(0, ItemLedgEntry);0 -
In the OnDrillDown trigger you also have to copy the flowfilters
ItemLedgerEntry.RESET; ItemLedgerEntry.SETCURRENTKEY("Item No.", "Posting Date"); ItemLedgerEntry.SETRANGE("Item No.", "No."); IF GETFILTER("Global Dimension 1 Filter") <> '' THEN ItemLedgerEntry.SETFILTER("Global Dimension 1 Code", GETFILTER("Global Dimension 1 Filter")); IF GETFILTER("Global Dimension 2 Filter") <> '' THEN ItemLedgerEntry.SETFILTER("Global Dimension 2 Code", GETFILTER("Global Dimension 2 Filter")); IF GETFILTER("Location Filter") <> '' THEN ItemLedgerEntry.SETFILTER("Location Code", GETFILTER("Location Filter")); IF GETFILTER("Drop Shipment Filter") <> '' THEN ItemLedgerEntry.SETFILTER("Drop Shipment", GETFILTER("Drop Shipment Filter")); IF GETFILTER("Variant Filter") <> '' THEN ItemLedgerEntry.SETFILTER("Variant Code", GETFILTER("Variant Filter")); IF GETFILTER("Lot No. Filter") <> '' THEN ItemLedgerEntry.SETFILTER("Lot No.", GETFILTER("Lot No. Filter")); IF GETFILTER("Serial No. Filter") <> '' THEN ItemLedgerEntry.SETFILTER("Serial No.", GETFILTER("Serial No. Filter")); FORM.RUNMODAL(0, ItemLedgerEntry);0 -
Thanks a lot
Works like a charm... 8)0 -
and i think COPYFILTER would be a tad cleaner aswell..
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
- 322 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
