web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

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

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Suggested answer
    Brandon Wiese Profile Picture
    17,788 on at

    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.

  • Community Member Profile Picture
    on at

    thanks alot .. will try it 

  • faiz7049 Profile Picture
    2,382 on at

    Hi Alykava,

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

    8585.SO.jpg

  • Weaveriski Profile Picture
    23,620 Moderator on at

    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans