I'm currently running into an issue with the following situation:
I have a right click event which executes a static method "inventTransferOrder". In that I have the following code:
select firstOnly invTransLine
where invTransLine.TransferId == invTrans.TransferId
&& invTransLine.LineNum == invTransLineNum;
args.record(invTransLine);
new MenuFunction(menuitemDisplayStr(InventTransferOrder), MenuItemType::Display).run(args);
In the form's (InventTransferOrders which lays behind the menu item InventTransferOrder) init method I'm executing the following code:
InventTransferLine invTransLine;
QueryBuildDataSource qbds;
QueryBuildRange qbr;
;
invTransLine = element.args().record();
qbds = InventTransferLine_Q.dataSourceTable(tableNum(InventTransferLine));
qbr = qbds.addRange(fieldNum(InventTransferLine, LineNum));
qbr.value(strFmt('%1', invTransLine.LineNum));
This is doing exactly what it's supposed to do: it filters the grid using the data source 'InventTransferLine' to the one record with the matching LineNum.
Contrary to this, I need to show all records (the InventTransferLine gets prefiltered to only show the lines for the InventTransfer record that's selected) BUT the one record with the matching LineNum should be highlighted so that a user could start working with that line immediately.
Could anyone help me out with this?
I have used the following code, but it (visually) does not do anything:
InventTransferLine_DS.findRecord(invTransLine);
InventTransferLine_DS.mark(true);
I'd appreciate any help.
Thanks a lot and kind regards