Hi,
I am using the code from the following link to post the transfer order using X++ code:
blog.slcconsulting.us/.../posting-a-transfer-order-using-x
I have a scenario to post a transfer order after the purchase order invoice is posted. I am taking the information from vendinvoicejour and vendinvoiceTrans tables to fill the transfer order header and line tables. But when I am calling the InventTransferUpd.Run method, I am getting the below error:
No lines for posting. Update has been cancelled.
Can anyone please let me know what I am missing here or if someone can share the exact code to post the transfer orders using code that would be great.
I am using the following code to post the transfer order:
inventTransferParmTable.TransferId = inventTransferTable.TransferId;
inventTransferParmTable.EditLines = true;
inventTransferParmTable.AutoReceiveQty = true;
inventTransferParmTable.ExplodeLines = true;
inventTransferParmTable.UpdateType = InventTransferUpdateType::Shipment;
inventTransferParmTable.TransDate = systemDateGet();
inventTransferParmTable.ShipUpdateQty = InventTransferShipUpdateQty::All;
inventTransferUpd = InventTransferUpdShip::newParmBuffer(inventTransferParmTable);
inventTransferUpd.run();
Thanks inadvance