i have a display method on a form which shows data only if i switch from Configurations to Onhand, from Onhand to Configurations tab pages,
display method is added to first grid in first tab page (Configurations tab page)
why is happening so ? how to fix it and make it with data once opening the lookup form rather than after switching tabs ?
my display method is on InventDim Datasource and looks like:
public display Description getConfigIdDesc(InventDim _inventDim)
select firstOnly * from ecoResConfiguration where ecoResConfiguration.Name == _inventDim.configId
join ecoResProductMasterConfiguration where ecoResProductMasterConfiguration.Configuration = ecoResConfiguration.RecId &&
ecoResProductMasterConfiguration.ConfigProductDimensionAttribute == EcoResProductDimensionAttribute::inventDimFieldId2DimensionAttributeRecId(fieldNum(InventDim, ConfigId)) &&
ecoResProductMasterConfiguration.ConfigProductMaster == InventTable::find(element.inventDimSetupObject().callerItemId()).Product
join ecoResProductMasterDimValueTranslation where ecoResProductMasterDimValueTranslation.ProductMasterDimensionValue == ecoResProductMasterConfiguration.RecId;
What do you see if "the method does not show data"?
You said that it showed the data if you switch "from Configurations to Onhand" and also "Onhand to Configurations". But you said it's on Configuration tab page, so how can you see it when you switch to Onhand tab page?
What did you find when you debugged your code?
i see empty field in the beginning, if i debug, i see that it calls the display method if i switch between first - configurations, second - onhands, third - configurations back again - hits the debugger and works fine,
by "From configurations to onhand and from onhand to configurations back" - i mean if i switch from first tab page (field is empty) to onhand and straight after that back to configurations again - it gets populated and (debugged) display method gets called then for the first time and it has data populated
btw - if i just open the lookup form for the first time and its first opened tab is Configurations -> the debugger doesnt hit in display method, display method is not called and the field is empty
Which data source did you add the method to?
The grid at Configuration tab page is bound to InventDimDimension, therefore this seems to be the right data source.
Yesssss sorry stupid mistake.... it works fine, thank you ! I had it on InventDim, rather than InventDimDimension