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)

Releasing non-picking list confirmed sales order reservations

(0) ShareShare
ReportReport
Posted on by 747

Hey all, sorry. I normally google stuff before coming here, but I'm in a bit of a crunch.

We had a client go live last week and they unknowingly had sales order reservations set to "automatic", so it was reserving inventory as soon as the line was created. They were under the assumption that it only reserved inventory upon creating a picking list.

Anyway, we set the reservations to manual and now I have a requirement to remove reservations for all sales orders that do not have a non-cancelled pick list. Could anybody point me in the right direction as to how to remove the reservations? Either through the UI or through code. I'm assuming the inventtrans' inventDimId should be reverted to the line's inventDimId after I run this.

Thanks for any help.

*This post is locked for comments

I have the same question (0)
  • Yohann Rolland Axcible Profile Picture
    3,111 on at

    Hi Kyle,

    Can you just precise if you're using the WMS or only the basic reservation system ?

    I can guess it's setup without WMS but to be sure before helping you.

    Thanks

  • Verified answer
    Guy Terry Profile Picture
    28,924 Moderator on at

    Hi Kyle,

    If you have a sales order where the picking list has not been posted, you can remove the reservation from the sale order line by doing 'Inventory' -> 'Reservation'. In the 'Reservation' form that opens, delete the value in the 'Reservation' column.

    If the order has an open picking list, then I think the Reservation column will already be blank (because the Reservation will have been moved to the Picking list).

    If going into each sales order in turn gets tedious, you could investigate the 'Release sales order picking' form:

    technet.microsoft.com/.../aa496962.aspx

    It will list order lines, and you can update the value in the 'Reservation quantity' field (and if the picking list has already been posted, I think the order won't even appear on the form, or if it does the 'Activate remainder' field will be blank).

  • KyleLeBarre Profile Picture
    747 on at

    Just the basic reservation system.

  • Yohann Rolland Axcible Profile Picture
    3,111 on at

    To cancel a reservation, try what Guy suggested.

    From each SO line, you should go to the reservation forms, and delete the automatic reservation.

    There is no massive way to cancel them you have to cancel line by line.

  • KyleLeBarre Profile Picture
    747 on at

    Thanks for pointing me in the right direction. I've re-used some of the code in the edit method for that "reservation quantity" field. I wrote a job to un-reserve all of my lines that fit my criteria and it seems to be working fine.

    Here's my basic job if anyone wants to pick it apart (hi martin):

    static void RemoveSalesLineReservations(Args _args)
    {
        SalesLine               salesLine;
        SalesTable              salesTable;
        WMSPickingRoute         pickingRoute;
        InventQty               reservQty;
        InventMovement          movement;
        
        ttsBegin;
        while select forUpdate salesLine
            where salesLine.reservation == ItemReservation::Automatic
        join forupdate salesTable
            where salesTable.salesid == salesLine.SalesId
                && SalesTable.salesstatus == SalesStatus::Backorder
                //&& salesTable.salesid == 'SO-0040339'
        notexists join pickingRoute
            where pickingRoute.transType == InventTransType::Sales
                && pickingRoute.transRefId == salesTable.SalesId
                && (pickingRoute.expeditionStatus == WMSExpeditionStatus::Activated
                || pickingRoute.expeditionStatus == WMSExpeditionStatus::Complete)
        {
            
            salesTable.Reservation = ItemReservation::None;
            
            if(salesTable.validateWrite())
            {
                salesTable.update();
            }
            
            salesLine.reservation = ItemReservation::None;
            salesLine.PdsBatchAttribAutoRes = NoYes::No;
            if(salesLine.validateWrite())
            {
                salesLine.update();
            }
            
            movement    = InventMovement::construct(salesLine);
            reservQty   = (- movement.transIdSum().reserved()) ; //reverse reservation
    
            if (reservQty)
            {
                InventUpd_Reservation::updateReserveBuffer(salesLine, reservQty);
    
                // write down activate now on sales line (inventDeliverNow) if reservation is reduced
                if (salesLine.InventDeliverNow > salesLine.reservedPhysical())
                {
                    salesLine.InventDeliverNow = salesLine.reservedPhysical();
                    salesLine.update();
                }
            }
        }
        ttsCommit;
    }


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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans