This is a function I wrote to receive a transfer order. The code will receive into the default receiving location as defined when the transfer order was placed. I found other code snippets for creating a transfer order but none to receive.
static void receiveTransferOrderToDefaultLocation(str 20 transferId)
{
InventTransferParmTable itpt;
InventTransferUpdReceive itur;
;
itpt.clear();
itpt.initParmDefault();
itpt.ParmId = RunBaseMultiParm::getSysParmId();
itpt.TransferId = transferId;
itpt.UpdateType = InventTransferUpdateType::Receive;
itpt.PrintTransferReceipt = NoYes::No;
itpt.ReceiveUpdateQty = InventTransferReceiveUpdateQty::All;
itpt.EditLines = NoYes::Yes;
itpt.ExplodeLines = NoYes::Yes;
itpt.InventDimFixedReceiveList = 245; // See note below on how to compute this.
itur = InventTransferUpdReceive::newParmBuffer(itpt);
itur.run();
/*
#DEFINE.INVENTLOCATIONID_IDX(0)
> #DEFINE.BATCH_IDX(1)
> #DEFINE.LOCATION_IDX(2)
> #DEFINE.PALLET_IDX(3)
> #DEFINE.SERIALID_IDX(4)
> #DEFINE.CONFIGID_IDX(5)
> #DEFINE.INVENTSIZEID_IDX(6)
> #DEFINE.INVENTCOLORID_IDX(7)
binary: 11110101
decimal: 245
*/
}
4ef90eb1-a2bf-45b2-9f27-e94a2a353231|0|.0