Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Removing reservation from output order transaction by code X++

(0) ShareShare
ReportReport
Posted on by 2,654

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

  • Kauto Profile Picture
    2,654 on at
    RE: Removing reservation from output order transaction by code X++

    As an update to this issue:

    It would appear that IF I am able to END the output order, the reserved qty is then passed across from being locked against the output order transaction and back against a reservation for the sales line.

    This means the code above should work for cancelling remaining qty.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,157 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,938 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans