Hi All
I tried making these changes marked by the (*****************) on Form InventProductDimensionLookup method initDimensionControls()
I added a string field to the design next to config field auto declared as dimensionName2
then in InitDimensionControls added
dimensionName2.dataSource(InventDimCombinationDimension_ds.id());
dimensionName2.dataField(fieldNum(InventDimCombination,ItemId));
they are at bottom of the code.
To try to pull through to the lookup the itemid from the InventDimCombinationDimension_ds
but no luck there.
private void initDimensionControls()
{
FormStringControl dimensionControl;
FieldId dimFieldIdForLookup = this.inventDimSetupObject().parmMainSortFieldId();
FieldId retailFieldIdForLookup = this.getDimFieldIdForLookup(true);
void moveControlToBeginning(Object _container, FormStringControl _control)
{
FormControl firstControl;
do
{
_container.moveControl(_control.id());
firstControl = _container.controlNum(1);
}
while (firstControl.id() != _control.id());
}
//make a dimension field (the one for we are looking up) a first field in the combination grid
dimensionControl = this.findDimensionControl(gridCombination, dimFieldIdForLookup);
moveControlToBeginning(gridCombination, dimensionControl);
//make a dimension field (the one for we are looking up) a first field in the on-hand grid
dimensionControl = this.findDimensionControl(inventoryDimensions, dimFieldIdForLookup);
moveControlToBeginning(inventoryDimensions, dimensionControl);
//Set up field for GridDimension
if (isRetailLookup)
{
gridDimension.dataSource(retailDisplayOrderDimension_ds.id());
dimensionName.dataSource(retailDisplayOrderDimension_ds.id());
dimensionName.dataField(retailFieldIdForLookup);
}
else
{
dimensionName.dataSource(inventDimDimension_ds.id());
dimensionName.dataField(dimFieldIdForLookup);
//******************* addition's for lookup method *********************************************
dimensionName2.dataSource(InventDimCombinationDimension_ds.id());
dimensionName2.dataField(fieldNum(InventDimCombination,ItemId));
//********************************************************************************************
}
}