Playing with MARKEDONLY
Mauddib
Member Posts: 269
I was playing around with MARKEDONLY and although i know there are other solutions (like adding a boolean to the Item table) I am wondering what I am doing wrong here....
OnOpenForm() for the Item list I set MARKEDONLY(TRUE);
OnAfterGetRecord I set MARK(TRUE) then in an IF Statement I set it back to false if certain criteria are met.
However when I open the form it only shows the first item in the system?
OnOpenForm() for the Item list I set MARKEDONLY(TRUE);
OnAfterGetRecord I set MARK(TRUE) then in an IF Statement I set it back to false if certain criteria are met.
However when I open the form it only shows the first item in the system?
0
Comments
-
This is because the OnAfterGetRecord is run on current record and gets the MARK(TRUE). And the others don't have it, so only that one is shown.
In the OnOpenForm, you should loop the records, mark what you need and then do a MARKEDONLY(TRUE).
The negative of this is that it can take a while before the form opens.
So the better way would be if you have 1 field on which you can filter.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Making a field on tables just so you can sort is a bad solution.0
-
I didn't mean making a field to fill up on-the-fly for sorting.Mbad wrote:Making a field on tables just so you can sort is a bad solution.
But a field you can fill up when inserting/modifying the record. In this case you don't lose extra time. If this does not work, the MARK-ing is the best way.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
I know you didnt, Kriki, only added the comment to avoid confusion. If you can group on insert/modify on the master table it will ease the filtering.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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 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