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

Removing reservation from output order transaction by code X++

$
0
0

Hi,

AX 2012 R3

I'm trying to edit, reduce or remove the reservation qty assigned against an output order transaction.

The business process is posted a picking list with reservation enabled.

The reason this modification is being done is that a third party mobile app is performing the update of the wmsOrderTrans record so if it has 10 reserved and 10 due to be picked, the picker updates 8 well the output order transaction qty will be reduced to 8 and processed as complete.

The reduction and process is fine and I have normally used code like below to edit reservations through code but when I try to apply this to the InventTrans record movement relating to the output order transaction, the reservation is not being reduced or changed.

Here is the code and this works fine for reservations placed against the sales order line but not when the reservation is placed against the wmsOrderTrans record linked to the sales order line

// remove reservation by updating inventTrans movement
    inventMovement = inventTrans.inventMovement(false); 
    inventUpd_Reservation = InventUpd_Reservation::newInventDim(inventmovement, inventTrans.inventDim(), 2, false);    

    inventUpd_Reservation.updatenow();

Has anyone any suggestion as to what way I need to tweak this to edit the reservation qty on the InventTrans record linked to an output order transaction line which is in turn linked to a sales order

Thanks


Viewing all articles
Browse latest Browse all 175888

Trending Articles



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