Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

how to reverse or cancel auto reservation from a single sales order

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello there 

Currently, our reservation status for all sales orders is set to manual. When we want to reserve, we simply change the status to automatic and its working fine. 

the issue is when we want to cancel the reservation for this sales order. we dont want to do it manually by selecting inventory> reservation

we simply wanna reverse the status from automatic to manual. When we do that nothing changes and the status stays as it is, physically reversed.

our sales orders usually have hundred of items. cancelling the reservation manually will take alot of time. 

is there a solution for this ??

thanks alot  

*This post is locked for comments

  • Weaveriski Profile Picture
    Weaveriski 23,616 on at
    RE: how to reverse or cancel auto reservation from a single sales order

    Faiz7049 I feel you have misunderstood the process, they only want to reserve when they set it to automatic as a control mechanism, but they dont want to follow the process AX has as standard for an unreserve - slightly more clicks as they want you to think about it and the logic checks that it is possible.

  • faiz7049 Profile Picture
    faiz7049 1,950 on at
    RE: how to reverse or cancel auto reservation from a single sales order

    Hi Alykava,

    Go to Account Receivable-->Setup-->Accounts Receivable Parameters.

    8585.SO.jpg

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to reverse or cancel auto reservation from a single sales order

    thanks alot .. will try it 

  • Suggested answer
    Brandon Wiese Profile Picture
    Brandon Wiese 17,788 on at
    RE: how to reverse or cancel auto reservation from a single sales order

    You could add a little code to a strategic place to do the same work.

    Here's an example of such code.  Depending on where you put it, the salesLine variable might be "this".

    This is provided for educational purposes only.  It is not tested.  Use at your own risk.

    InventTransOriginId inventTransOriginId;
    InventTransIdSum inventTransIdSum;
    InventQty inventQty;
    InventUpd_Reservation inventUpd_Reservation;
    ;

    inventTransOriginId = InventTransOriginSalesLine::findInventTransOriginId(salesLine.dataAreaId, salesLine.InventTransId);
    inventTransIdSum = InventTransIdSum::newTransOriginId(inventTransOriginId); inventQty = -inventTransIdSum.reserved(); // how much is currently reserved if (inventQty) // if not 0 { inventUpd_Reservation = InventUpd_Reservation::newMovement(InventMovement::construct(salesLine), inventQty, false); inventUpd_Reservation.updateNow(); // reverse the reservation }


    As far as where to run the code, perhaps in SalesLine method modifiedField(), or in the write() method on your form (after checking to see if the value of the Reservation field is No, or was changed from Yes to No, or however).  These will all come with trade-offs as far as when and how well they work.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,883 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,569 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans