Make my own "OnUpdate"?

pdj
Member Posts: 643
When assigning a Form (child-form) to a menu-item, set up the link and mark it "OnUpdate". The child-form then automaticly "refresh" when ever the mother-form is changing record. (And that is a VERY nice feature!)
But now I have a child-form which filters are depending on the type of record shown in the mother-form.
Example, while browsing through Employees, it should based on "Sex" show possible sport activities. Of course every sport activity is marked with "Sex" too. Unfortuantly they can be "Male", "Female" or "Both". Of course it should filter accordingly.
And when Employee-Sex is blank, it shall be considered unknown, and then show every sport activity.
This case is not possible to set in the link, but is possible to make by doing it in C/AL and use RUNMODAL. But then I loose the neat OnUpdate functionality... Any solution?
TIA
Peter
But now I have a child-form which filters are depending on the type of record shown in the mother-form.
Example, while browsing through Employees, it should based on "Sex" show possible sport activities. Of course every sport activity is marked with "Sex" too. Unfortuantly they can be "Male", "Female" or "Both". Of course it should filter accordingly.
And when Employee-Sex is blank, it shall be considered unknown, and then show every sport activity.
This case is not possible to set in the link, but is possible to make by doing it in C/AL and use RUNMODAL. But then I loose the neat OnUpdate functionality... Any solution?
TIA
Peter
Regards
Peter
Peter
0
Comments
-
One method would be to add a field to the Employees table called "Sex Filter" and make it a flow filter. Then, include this flow filter in the SubFormLink property on the form. Next, add code to the parent form's OnAfterGetRecord trigger to do a SETFILTER("Sex Filter", '%1|%2', whatever::Male, whatever::both)
-jp-jp0
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