[ExtensionOf(classStr(InventDimCtrl_Frm_OnHand))]
internal final class In_InventDimCtrl_Frm_OnHand_Extension
{
public void modifyQueryBasedOnDatasourceName(
Query _inventSum_DS_Query,
str _inventSum_DS_Name,
FormDataSource _inventDim_DS)
{
next modifyQueryBasedOnDatasourceName(_inventSum_DS_Query, _inventSum_DS_Name, _inventDim_DS);
Query query = _inventSum_DS_Query;
if (groupByNameAlias)
{
QueryBuildDataSource inventTableDataSource = query.dataSourceTable(tableNum(InventTable));
if (inventTableDataSource)
{
QueryBuildDataSource qbds;
qbds =inventTableDataSource.addDataSource(tableNum(In_InventTableExpanded));
qbds.addLink(fieldNum(InventTable,itemid),fieldNum(In_InventTableExpanded,itemid));
qbds.JoinMode(JoinMode::InnerJoin);
query.dataSourceTable(tableNum(In_InventTableExpanded)).addGroupByField(fieldNum(In_InventTableExpanded, ItemId));
query.dataSourceTable(tableNum(In_InventTableExpanded)).addGroupByField(fieldNum(In_InventTableExpanded, ProductName));
}
}
}
}