use different SourceTable for different pages of tab control

jks
Member Posts: 277
How can i provide different source table for different pages of the tab control?
e.g Customer Card uses Tab control having 7 pages. I added one more page to that tab control. I want to use different SourceTable for newly added tab page.
I wrote C/AL code, retrieved values from the table(which is not a customer table) and assigned those values to the fields available on newly added tab page. But it makes those fields disabled eventhough Enabled and Editable properties are yes.
Please help.
e.g Customer Card uses Tab control having 7 pages. I added one more page to that tab control. I want to use different SourceTable for newly added tab page.
I wrote C/AL code, retrieved values from the table(which is not a customer table) and assigned those values to the fields available on newly added tab page. But it makes those fields disabled eventhough Enabled and Editable properties are yes.
Please help.
0
Comments
-
For every tabpage create a new form with different tables.
Put subforms on every tab page and use the SubFormID property to assign one of the newly created forms. When running the main form your created form will appear within the subform control borders.
Be aware that placing 7 subforms on 1 form may cause performance problems.In a world without Borders or Fences, who needs Windows and Gates?0 -
No,no. I don't want 7 subforms.
One form is there and it alreadly contains 7 tab pages. All those 7 tab pages are using same Source Table. I added one more tab page and only for that tab page i want to use different SourceTable.
Can i do so by setting the SourceExpr property of the textfield which i placed on newly added tab page?0 -
You can bind a control to a variable by setting the SourceExpr property to the variable you want to show.
For example:
SourceExpr = SalesLineRec."No."
But the field will not be editable. Therefore it is not really recomandable. The only good way to alter table data is by using forms (and subforms) that are bound to that table and not variables so i still sugest to do that.[/code]In a world without Borders or Fences, who needs Windows and Gates?0 -
Ok.
Thanks.0 -
One form = One source table... Not more... if you want more, you must use subform... no way around...0
-
SalesLineRec ?
Why not call it SalesLine, just like standaard Navision does?
Before you know it people will post fix everthing... I've even seen:
SaleLineRecGlb or SalesLineRecPar! Never seen this in standard Navision though. So why start doing it????
But still, it's better the pre fixing. Imagine these kinds of variables:
GlbRecSalesLine or even better LclDecQty.
I know Qty is a variable, IT SHOULD ALWAYS BE DEFINE LOCALLY and don't tell me you need to know that QTY is of the type decimal. I MUST BE A DECIMAL! If this is a Integer a new training is needed!
Conclusion: Qty is the only right way yo define this variable. You don't even have to have good arguments for this, the best reason is STANDARD NAVISION!
Maybe this should be a new topic on the forum..."Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 -
somehow off topic but i totally disagree.
Dont tell me navision standards are highly readable.
Now people can see it is a record whilst otherwise it could just as well be an automation variable for example. I know there would not be any confusion in this topic but just as well.
Oh well and it is not really our conventions but i see a lot of people juse it like this and thats why i posted it here like that.
(There is nothing wrong with having an own convention as long as it is done companywide.)
oh in fact we use:
lrecSalesLine (local record sales line)
grecSalesLine (globar record sales line)
liCount (local integer)
so 1 letter for the variable being local or global and 1 letter for simple variable types or 3 letters for complex variable types.
So more in the direction of C++ style conventions.In a world without Borders or Fences, who needs Windows and Gates?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 320 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