Hello,
I have joined view to my custom form like that:
Then I added the following code to the init() method of my view "InventTableExpandedShort_ICL" to help AX with relation:
public void init() { super(); this.queryBuildDataSource().addLink(fieldNum(ProductAvailability_ICL,ItemId),fieldNum(InventTableExpandedShort_ICL,ItemId)); }
On my form I have two datasources for ProductAvailability_ICL table:
1)ProductAvailability_ICL
2) ProductAvailability_Batch
They are related like that:
And inside ProductAvailability_Batch datasource init method there is a dynalink:
this.queryBuildDataSource().clearDynalinks(); this.queryBuildDataSource().addDynalink( fieldNum(ProductAvailability_ICL, InventBatchId), ProductAvailability_ICL, fieldNum(ProductAvailability_ICL, InventBatchId));
I need a productname field from my view InventTableExpandedShort_ICL showed on both tabs of the form. One tab of the form contains grid fields from ProductAvailability_ICL datasource and other tab contains grid fields from ProductAvailability_Batch. When I add productname to the grid ProductAvailability_ICL it shows fine but when I add productname to ProductAvailability_Batch it doesn't show productname correctly for my itemids. What am I missing?
Thanks.