How to mark records automatically when opening a list page?
                
                    MortenSteengaard                
                
                    Member Posts: 144                
            
                        
            
                    Hi experts,
I have made a new list page that shows some records in Business Central cloud.
I would like that when the page is shown, all the records are marked automatically.
Then the user can unmark some of them and press a button.
I know that the function "Mark(true)" can mark a record, but I cannot see it on the page.
How do I do that?
                I have made a new list page that shows some records in Business Central cloud.
I would like that when the page is shown, all the records are marked automatically.
Then the user can unmark some of them and press a button.
I know that the function "Mark(true)" can mark a record, but I cannot see it on the page.
How do I do that?
0                
            Answers
- 
            Perhaps you might want to write a code on the open page trigger of the page and mark the record and filter on marked records. You will find the example of that code if you search.United Kingdom0
 - 
            Hi Developer101,
Thank you for your reply. I have done as you suggested, but I cannot make it show on screen that the records are selected. In the open page trigger on the page, I have added this code:
Rec.FindSet();
repeat
Rec.Mark(true);
until Rec.Next() = 0;
Rec.MarkedOnly(true);
Rec.FindSet();
(I only open the page, if there is at least one record to show.)
I have made a solution, where I have added a new field (a boolean called "Marked") to the record. I set it on all the records, I show, and then the user can unmark, whatever he/she wants. This works fine, but of course I would prefer, if the user would select these records in exactly the same way as other records in Business Central. But it seems, that is not implemented by Microsoft (yet).
0 
Categories
- All Categories
 - 73 General
 - 73 Announcements
 - 66.7K 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
 - 323 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
 
