Hello,
I have a form and a page that are supposed to have identical behavior. The form is behaving correctly but the page is behaving eratically. I'm wondering if somebody can look at what I'm trying to do and see if anything comes to mind that would explain the behavior I'm seeing.
The page has a text box, a grid, and a subform. The data in the subform needs to be filtered based on the selection in the text box. The text box is unbound and contains a custom lookup. What I have done is added a Set method on the subform that I call in the OnValidate of the text box. The method passes the selection to the sub-form, sets the filter of the sub-form, and refreshes the form. Here's the code:
.......................
SetKeyData(_keydata : Text[10])
Rec.RESET;
Rec.SETFILTER("Key Data Field", '=%1', _keydata);
CurrPage.UPDATE(FALSE);
....................
This should filter the values displayed in the sub-form based on the selection in the text box on the main form. This works perfectly on the classic client form version, but what I'm seeing in the RTC page version is that the values in the sub-form are somehow being filtered based on the selection in the main page grid. The key in the sub-form table is a single field. The table in the sub-form is not related to the table in the main form but the table in the main form does include the same field which is used as a key in the sub-form. I have been stuck on this for a while. I don't see any table relations that are defined. The SourceTableView property on the sub-form is not set. The SubFormView and SubFormLink properties on the main form are also not set. I'm at a loss as to what could be causing this relationship to be happening automatically. I figure there must be a setting somewhere that is causing this to happen but I can't seem to find it. If anyone has any suggestions or ideas on why this might be happening, it would be a huge help.
Thanks!
Adam
0
Comments
You better look into one standard page example and follow the same...
http://midynav.blogspot.com/ (Microsoft Dynamics Navision)
That's a good idea. Can anyone suggest a standard page in NAV where the sub-form data is filtered without using the SubFormLink property? I've searched around and haven't found one yet.