Here is an example of X++ code to post the transfer order picking list with a check that it was successful:
InventTransferParmTable inventTransferParmTable;
InventTransferUpdPick inventTransferUpdPick;
ParmId parmId = RunBaseMultiParm::getSysParmId();
inventTransferParmTable.clear();
inventTransferParmTable.initParmDefault();
inventTransferParmTable.ParmId = parmId;
inventTransferParmTable.TransferId = _transferId;
inventTransferParmTable.UpdateType = InventTransferUpdateType::PickingList;
inventTransferParmTable.PickUpdateQty = InventTransferPickUpdateQty::All;
inventTransferParmTable.EditLines = NoYes::Yes;
inventTransferParmTable.PrintTransferPickingList = NoYes::No;
inventTransferUpdPick = InventTransferUpdPick::newParmBuffer(inventTransferParmTable);
inventTransferUpdPick.run();
WMSPickingRoute wmsPickingRoute;
if (inventTransferUpdPick.parmIsSomeThingPosted())
{
select firstonly RecId from wmsPickingRoute
where wmsPickingRoute.ParmId == parmId
&& wmsPickingRoute.transRefId == _transferId
&& wmsPickingRoute.transType == InventTransType::TransferOrderShip;
}Support The Author
If you found value in what I share, I've set up a Buy Me a Coffee page as a way to show your support.
No comments. Be the first one to comment on this post.
DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics 365 FO.
Authors are allowed to set their own "buy me a coffee" link.
Join us.