Hi all,
I have created a new table called "WM Special Terms" having fields as Account (Code(8)), Product(Code(4)) and Discount(Decimal). The table is populated with relevant data.
Next I have created a new tabular form (page) "Special Terms" having source table as "WM Special Terms". On running this form(page), the source table data is displayed.
Further I have customized the "Customer Card" by adding a new tab(fasttab) called "Special Terms". On this tab, I have added two subform controls, say Subform1 and Subform2, both having SubFormID/PartID = "Special Terms" (form/page) but using different filters to display the data.
After transforming the form to page using the transformation tool, when i run the "Customer Card" in RTC, i see the "Special Terms" fastab displaying both "Subform1" & "Subform2". I also see "Actions" flash-button on both of the subforms. When i click this button on say "Subform2", a menu-option "Part > Remove" is displayed. Un-doubtedly i clicked this menu and the "Subform2" disappeared allowing "Subform1" to expand and occupying the whole content area.
The problem now is how do i get back "Subform2" again on "Customer Card" page.
Any idea!
Thanks,
Hemant
Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Anyway, i could not locate how to get back "Subform2" on the fasttab so i have no options than to restore the backup db.
Coming to next problem...
The sub-forms are kept to display filtered data as per below criteria:
--> "Subform1" will display only those special terms that are applicable to current customer
--> "Subform2" will display those special terms that are generally applicable to all customers
Note that both subforms have the same source table.
I have written two functions on the actual form "Special Terms" to serve the above two purposes. One function is FilterSpecificTerms("No.") and the other is FilterGeneralTerms("No.") .
These two functions are called from "OnAfterGetRecord()" of Customer Card.
In NAV 5.0 when i open Customer Card and go to "Special Terms" tab, both subforms display correctly filtered data.
However after transforming these form to page, when i view "Customer Card" page in NAV 2009 RTC, both subforms display all data and i do not see any filter being applied.
Am i missing something w.r.t. filtering on page object.
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Also i have decreased the indentation in page designer so as to allow both subforms to appear in different fasttabs.
I can see two different fasttabs however they do not filter the data as expected.
Do you want me to paste the function code here.
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
Have you tried to do that?
I wouldn't expect the client to like two parts in one fasttab (which you confirmed in this post)
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
For the time being forgot my filter function.
You can visualize the setup as below:
"Special Terms" is a table with "Account", "Product" & "Discount" field. The table is populated with data. It has ("Account, "Product") as the primary key. "Account" is mapped to "No." of Customer table.
The Customer page is modified by adding a subform control "Special Terms" as a part.
The SubformLink property of this part is set to Account = FILTER("No.").
Now when i run the Customer page and click on "Special Terms" fasttab, it shows me all records from "Special Terms" table instead of the records belonging to current customer.
It sounds as if the FILTER() is not working!
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)