Sometimes the SubFormLink property just isn’t enough to establish the desired relationship between the current record on the main form and the records on a subform. When this happens we have been able to use (in the classic client) the OnAfterGetCurrRecord trigger on the main form to call a function on the subform. Typically, this function is passed values from the main form that are used to set the proper filters on the subform; the filters on the subform are typically set in filter group 4 to keep them isolated and therefore not able to be changed by the end user.
I’m looking to do something similar with pages and subpages and am struggling because of the fact that there is no OnAfterGetCurrRecord trigger for pages. I have noticed that an example of this practice in the W1 database is form 521 (Application Worksheet). In 5.0SP1 this form uses the OnAfterGetCurrRecord trigger to set filters on its two subforms. In NAV2009 this form has been redesigned and the resulting form and page no longer has subforms; they have been replaced be separate forms that are run by making selections from a menu button. I don’t particularly care for the new user interface and am looking for a way to deliver something closer to what was possible witht he classic client. Does anyone have any ideas on how to achieve this?
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thanks,
Adam
Our forms have a worksheet (like a journal) on the main form, and then a subform (like item tracking lines), showing also.
We are having issues with the subform (item tracking lines) that are being displayed properly, but if we try and add a new record, if may or may not get inserted properly with the proper linking. It would be very frustrating to remove this functionality for use with pages.
http://www.epimatic.com
SDE II
Dynamics Nav Client
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.