Hello,
I have a display method created on the InventSum datasoure of the InventOnhandItem form. Based on the debugging I did on this method, _inventSum is "No data selected"
This method calls the myMethod method from the InventSum table extension.
[ExtensionOf(formDataSourceStr(InventOnhandItem, InventSum))]
final class InventOnhandItem_InventSum_XXX_Extension
{
display Qty myDisplay(InventSum _inventSum)
{
FormDataSource inventSum_ds = _inventSum.datasource();
InventSum inventSum = inventSum_ds.cursor();
FormDataSource inventDim_ds = inventSum_ds.formRun().dataSource("InventDim");
return InventSum.MyMethod(_inventSum, InventDim_ds);
}
}
[ExtensionOf(tableStr(InventSum))]
final class InventSum_XXX_Extension
{
public Qty myMethod(InventSum _inventSum, FormDataSource _ds)
{
InventTrans inventTrans;
InventDim inventDim;
Common common = formJoinedRecord(_inventSum, _ds);
if(common.TableId == tableNum(InventDim))
{
inventDim = common as InventDim;
}
if(inventDim.InventLocationId)
{
return 99;
}
return 0;
}
}
The requirement is that the display is to show a value of 99 if the 'Location' storage dimension is enabled and not empty for the row.
I have the same logic in AX12 and there it works without any problem. I'm trying to get it into D365, but with no results.

Could you please help me?