Automatic key selection

Administrator
Member, Moderator, Administrator Posts: 2,506
Automatic key selection
Do you know users that search through a lot of records by setting filters without choosing the correct key? I do too! It's a bad experience for the user and it takes a lot of time and it reduce the overall performance of the Navision system.
So why not let the system automatically choose the best key each time the user set's a filter? The catch is that you need to make a few program lines on each form where you want to use this functionality.
A short description of what to do on each form is entered in the Documentation part of the object. The download also includes a txt file of the object. The object is created in a 3.70 environment. The "Best key" function it self is created by the master him selves: Preben Rasmussen - Thanks!
http://www.mibuso.com/dlinfo.asp?FileID=895
Discuss this download here.
Do you know users that search through a lot of records by setting filters without choosing the correct key? I do too! It's a bad experience for the user and it takes a lot of time and it reduce the overall performance of the Navision system.
So why not let the system automatically choose the best key each time the user set's a filter? The catch is that you need to make a few program lines on each form where you want to use this functionality.
A short description of what to do on each form is entered in the Documentation part of the object. The download also includes a txt file of the object. The object is created in a 3.70 environment. The "Best key" function it self is created by the master him selves: Preben Rasmussen - Thanks!
http://www.mibuso.com/dlinfo.asp?FileID=895
Discuss this download here.
0
Comments
-
Hey Anders ("Master of Disaster")
As always you are 'using and tweaking' my code.... nice to see that the GetBestKeyNo was useful!
Do keep up the great coding and submit more of your apps to mibuso.
Sincerely
"Navision Magician"0 -
This would be such a nice feature if the KeyReference.Index worked as it should for versions pre-4.03. Microsoft won't patch previous versions either
The problem is that RecordRef.KEYCOUNT only returns the number of Active keys. The RecordRef.KEYINDEX correctly loops through all keys though, but only as many as RecordRef.KEYCOUNT reports.
If any deactivated keys are present in between, the last active keys can't be reached.kr := rr.KEYINDEX(iKeyIdx); IF kr.ACTIVE THEN BEGIN FOR j := 1 TO kr.FIELDCOUNT DO BEGIN IF TEMPInt.GET(kr.FIELDINDEX(j).NUMBER) THEN BEGIN ; END; END; END ELSE BEGIN bInactiveKeys := TRUE; iNoOfInactive += 1; END; IF (bInactiveKeys) THEN MESSAGE('Deactivated Keys are present in this Table.\\' + // 'Due to a bug in MBS Navision, the number of deactivated keys equals ' + // 'the number of not reachable keys at the end of the list.\\' + 'It is possible that a more suitable Key could exist!')
It is impossible to make anything foolproof, because fools are so ingenious.0 -
Hey Anders Pahuus,
As i am new to navision, i was unable use this functionality.
Please tell how and where to write new program lines.0 -
Soft Tod wrote:This would be such a nice feature if the KeyReference.Index worked as it should for versions pre-4.03. Microsoft won't patch previous versions either
Thx for the info. Moving an inactive key to the last position was my solution. Doesn't rebuild anything.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