Make my own "OnUpdate"?

pdjpdj Member Posts: 643
edited 2000-03-30 in Navision Financials
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
Regards
Peter

Comments

  • jpjp Member Posts: 47
    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
    -jp
Sign In or Register to comment.