Forms, subforms, and OnAfterGetCurrRecord
jreynolds
Member Posts: 175
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?
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
-
There is technical problem with that. RTC is reading data during page opening. After that, the dataset is not "refreshed". And this is why there is no "next/preview" on the pages and why the subpage cannot be filtered based on some business logic. Because it will lead to have some process to "re-read" the dataset during the page is opened...0
-
I have the same problem. In a grid on a form, I can run code in the OnAfterGetCurrRecord() function when the user selects rows in the grid. Is there any equivalent for pages? Is there any way to tell when the user selects a different row in a grid on a page?
Thanks,
Adam0 -
Has someone found a workaround for this issue? We have several forms with 3 subforms which don't react to filtering like they used to with the RTC. Either they find too many records, and if they find the right records for one main form record they display these subpage records for the next main form record too.Kai Kowalewski0
-
I am having a similar issue with new forms we have designed.
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.0 -
I just wanted to bring this thread up and state that this is a big limitation with the RTC and I hope Microsoft will find a way to get the OnAfterGetCurrRecord trigger back in version 7. I have a similar form/subform situation where a list page in the header needs to refresh a sub-page with details for the current record (that can't be done with a link...it's not a related table) and the only way I can do it right now is to force the user to run an action manually as they move onto each record. Very ugly...Rob Hansen
http://www.epimatic.com0 -
Microsoft (MDCC) is monitoring this forum, so maybe they will pick this one up ;-)rdhansen wrote:I just wanted to bring this thread up and state that this is a big limitation with the RTC and I hope Microsoft will find a way to get the OnAfterGetCurrRecord trigger back in version 7.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
I'm not very familiar with the RTC as we don't use it by now. But I've maybe had a similar situation where the two tables are not related in a direct way. I created some kind of subform in a subform to display the three table relation. I don't know if it's possible to create something like a subpage in a subpage. But maybe that's an option. :?:"Money is likewise the greatest chance and the greatest scourge of mankind."0
-
Actually reintroducing the OnAfterGetCurrRecord trigger is a feature that we intend to deliver in NAV7.
Horina Serbanescu
SDE II
Dynamics Nav Client
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.0
Categories
- All Categories
- 73 General
- 73 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 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


