Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Error posting transfer order using X++ code

$
0
0

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


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>