Adding InventTable fields to InventOnHandItem form
Question
I'm trying to add InventTable table fields into InventOnHandItem form, I added InventTable in InventOnHandForm datasource and tested all kind of linktype properties with no results.
I also tried to modify InventSum table by adding InventTable in relations with link on ItemId but I have some weird results: if I change focus on InventOnHandItem form grid Lines, correct InventTable field datas appears on the grid first line
I think I should add some code on form datasource to correct focus,display and refresh problems but I have no ideas about how to proceed.
Does anyone have any ideas to help me to solve this problem?
Thanks in advance
Edit: I can't use display methods because I need to filter on the InventTable added fields
Solution
If you want the InventTable
fields being searchable on the grid, you will have to redesign the form completely.
This will involve adding InventTable
, InventSum
and InvenDim
as datasources inner joined (in the specified order) and adding the relevant InventTable
fields to the group by.
OTHER TIPS
You could add the fields as display methods on the InventSum
table.
To speed things up you could use caching.
See also Axaptapedia.