Showing Subform control on fasttab of Customer Card page
hav
Member Posts: 299
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
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)
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
0
Comments
-
Try to add the subforms into Frames to have them in different group on the page. May be it will help. In some "non-standard" situations (as two subpages on one Fasttab) the client can behive in a strange way. Not every situation which developer can create is handled correctly.0
-
Yes i do have placed subforms into frames so that they are contained in a group on page.
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.OnAfterGetRecord() BEGIN -------- CurrForm.SubForm1.FORM.FilterSpecialTerms("No."); CurrForm.SubForm2.FORM.FilterGeneralTerms("No."); END;
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.Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)0 -
Also the two subforms are placed on a single fasttab!Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)0 -
Check the Transformation toolkit log file after transforming the forms for more info what's going on. The calls to subform functions can be wrongly transformed. And may be you need to setup somehow that the frames means new fasttabs during the transformation...0
-
The frame do transform to a new fasttab as it is mapped to 'Group'.
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.Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)0 -
I don't know if I understand the problem correctly here - but if you look at the Sales Order Page, the lines part is not included in any group - the part will become a group in itself.
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)Freddy Kristiansen
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.0 -
The problem is that the subform control on the Customer Card page does not filter records specific to current customer record.
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!Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)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
- 327 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
