How to show Multiple selected records from one form to another in D365fo x++
How to show Multiple selected records from one form to another
Code:
public void init()
{
MultiSelectionHelper multiSelectionHelper;
PurchReqLine PurchReqLine_Loc;
QueryBuildDataSource qbds;
container selectedPR;
super();
if (element.args().caller() && element.args().record())
{
multiSelectionHelper = MultiSelectionHelper::construct();
multiSelectionHelper.parmDatasource(element.args().record().dataSource());
PurchReqLine_Loc = multiSelectionHelper.getFirst();
while (PurchReqLine_Loc.RecId != 0)
{
selectedPR += PurchReqLine_Loc.recid;
PurchReqLine_Loc = multiSelectionHelper.getNext();
}
PurchReqLine_ds.query().dataSourceTable(tableNum(PurchReqLine)).clearDynalinks();
PurchReqLine_ds.query().literals(true);
PurchReqLine_ds.query().dataSourceTable(tableNum(PurchReqLine)).addRange(fieldNum(PurchReqLine, RecId)).value(con2StrUnlimited(selectedPR));
}
}
Comments
Post a Comment