Record Selection with check boxes
Keiona007
Member Posts: 3
Hi,
I'm looking for a way to select records throught checkboxes.
For examples, each customer in the system can be assign specific items.
I need to go in the item list and select the ones I need and transfer them to my custom table.
***I already did the work with MARKONLY but the customer wants checkboxes instead.
My problem is that if the field "select" is in the item table, i need to reset it each time which is not great... and if the select field is a varaible in the form, when I check it, all records are checked at the same time. How can I make the field be specific to one record?
Thanks very much for your replies!
K
I'm looking for a way to select records throught checkboxes.
For examples, each customer in the system can be assign specific items.
I need to go in the item list and select the ones I need and transfer them to my custom table.
***I already did the work with MARKONLY but the customer wants checkboxes instead.
My problem is that if the field "select" is in the item table, i need to reset it each time which is not great... and if the select field is a varaible in the form, when I check it, all records are checked at the same time. How can I make the field be specific to one record?
Thanks very much for your replies!
K
0
Comments
-
Keiona007 wrote:***I already did the work with MARKONLY but the customer wants checkboxes instead.
I would insist a little bit on your idea, because he's trying to change Nav default behavior, but ok, I know how customers are...
Keiona007 wrote:My problem is that if the field "select" is in the item table, i need to reset it each time which is not great...
I think this is the better idea. But when resetting the "select" field, try use "MODIFYALL" sentence instead of "MODIFY" for each record. See if it makes difference or not.
Marcelo Borges
D365 Business Central Solutions Architect
BC AL/NAV C/AL Developer
BC Repositories.com0 -
You can keep a temptable on item in memory and each time the user clicks a checkbox of an item you can save the item in the temptable or delete it from the temptable. And the checkbox is true when the record for that item is in the temptable.
So you need a global boolean "blnChecked" variable that you use as variable for the checkbox.
In the OnAfterGetRecord, you fill the blnChecked variableblnChecked := tmpItem.GET("No.");
In the OnAfterValidate of the checkbox:IF blnChecked THEN BEGIN tmpitem := rec; IF tmpitem.INSERT(FALSE) THEN ; END else BEGIN IF tmpitem.GET("No.") THEN tmpItem.DELETE(FALSE); END;
And when you want to loop the checked items, you just loop the temptable.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thanks all for your input! It works like magic
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

