[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));
}
}
}
}
QueryBuildDataSource inventTableDataSource = query.dataSourceTable(tableNum(In_InventTableExpanded));
next modifyQueryBasedOnDatasourceName(_inventSum_DS_Query, _inventSum_DS_Name, _inventDim_DS);
Query query = _inventSum_DS_Query;
if (groupByNameAlias)
{
QueryBuildDataSource inventTableDataSource = query.dataSourceTable(tableNum(In_InventTableExpanded));
if (inventTableDataSource)
{
inventTableDataSource.addLink(fieldNum(InventTable,itemid),fieldNum(In_InventTableExpanded,itemid));
inventTableDataSource.JoinMode(JoinMode::InnerJoin);
query.dataSourceTable(tableNum(In_InventTableExpanded)).addGroupByField(fieldNum(In_InventTableExpanded, ProductName));
}
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156