How can I update a SubForm?

dietmarruef
Member Posts: 48
I have a problem with the CurrForm.UPDATE command. I make a Form with 1 Mainform and 3 SubForms. Now I try to update my Mainform if the Customer modifies the SubForm. But It does not work. Who has a solution for this Problem?
Dietmar
Dietmar
0
Comments
-
Sorry. But You can't update the main form from a sub form. The sub form simply isn't aware that it is a subform.
//LarsLars Westman
http://www.linkedin.com/in/larswestman0 -
The only real solution is to use the on timer function in the main form for example.
Create a flow field in the main table that sources the table in the sub form.
In the OnModify trigger of the table on sub form, update the source field (eg. SubFormTable.RecModified := TRUE <img border="0" title="" alt="" src="images/smiles/icon_wink.gif" />
Now the tricky part.
If you just call CurrForm.Update(true/false), you will have problems if you are actually modifying the sub form, so you will have to spend some time deciding what logic will trigger the update.
Don't forget to calcfields etc.
this is just a starting point, so good luck.David Singleton0
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