How to build a tree view form ?
Bronko
Member Posts: 6
Hi,
I´m still looking for a way to create a tree view form with standard NAV resources.
For example : I want to show a nested production BOM with expand / collapse function.
There are several forms in NAV 5.0 (583, 634, 703, 5522, 5847, 6520) that already have
the behavior I need, but the problem is, that they are based on a temporary table.
So the changes won't be written back to the database. I tried to synchronize the changes
by code, but there's a problem with the OnModify :
In Form 5522 it seems to work somehow, but I couldn't figure out how.
How is it possible to build a tree view form and write back the changes to the database ?
I´m still looking for a way to create a tree view form with standard NAV resources.
For example : I want to show a nested production BOM with expand / collapse function.
There are several forms in NAV 5.0 (583, 634, 703, 5522, 5847, 6520) that already have
the behavior I need, but the problem is, that they are based on a temporary table.
So the changes won't be written back to the database. I tried to synchronize the changes
by code, but there's a problem with the OnModify :
LocalRec := Rec; LocalRec.MODIFY;After entering the second modification I get the message 'Another user has modified the record...'.
In Form 5522 it seems to work somehow, but I couldn't figure out how.
How is it possible to build a tree view form and write back the changes to the database ?
0
Comments
-
You need to have code something like:
MyProdBomLine.get(rec."no.","line no.");
Myprodbomline := rec;
MyProdbomline.modify;
(There are many different ways to format this, so play around till you get the ideal).David Singleton0 -
Hi David,
thank you for your answer.
Unfortunately this doesn't work. I get the same error after the second modification. I also tried with TRANDFERFIELDS, but still the same problem.0 -
Bronko wrote:Hi David,
thank you for your answer.
Unfortunately this doesn't work. I get the same error after the second modification. I also tried with TRANDFERFIELDS, but still the same problem.
Show the actual code.David Singleton0 -
Form - OnModifyRecord() : Boolean ltRec.GET("Line No."); ltRec := Rec; ltRec.MODIFY;0 -
Bronko wrote:
Form - OnModifyRecord() : Boolean ltRec.GET("Line No."); ltRec := Rec; ltRec.MODIFY;
#-o sorry, my bad.... tryForm - OnModifyRecord() : Boolean ltRec.GET("Line No."); ltRec.transferfields(Rec); ltRec.MODIFY;David Singleton0 -
I'm sorry, but I still get the same error message.0
-
I solved the problem :
LocalRec := Rec; LocalRec.MODIFY; Rec := LocalRec
The MODIFY generates a new version of the record and you have to reassign it to the actual record to be able to make further changes.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
- 610 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
