Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Picking List Registration through X++

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everyone. I'm trying to confirm, picking list, picking list registration and packing slip on Sales Orders. I've already done confirming and picking the list. I have trouble coding the Picking List Registration, I couldn't find any reliable codes online that could somehow help my logic. Do you guys have available codes that somehow are related to Picking List Registration? Anything can help. Thank you!

PS: When I run my job, it creates the sales order, and does the confirm and picking list all at once. I want to include Picking List registration in the process. That's how it goes. Just saying. :)

*This post is locked for comments

  • Mahesh Holla Profile Picture
    Mahesh Holla 30 on at
    RE: Picking List Registration through X++

    Hi,

    I have a similar requirement.

    Did anyone find a solution?

    Regards,

    Mahesh

  • Abhijeet Kr  Profile Picture
    Abhijeet Kr 60 on at
    RE: Picking List Registration through X++

    Hi Hienz,

    Thanks for the response, my case is for sales order picking list. I got the idea but i want to update each line by line during some trigger... If if call finishMulti method using routeId it will update all the lines which we dont want. Any suggestions would be really helpful.

  • Suggested answer
    Heinz Schweda Profile Picture
    Heinz Schweda 1,365 on at
    RE: Picking List Registration through X++

    Hi, in this case you have to modify the quantity in your WMSOrderTrans-Record before calling WMSPickingRoute::finishMulti().

    There are several ways to do this, the following code worked for me:

    static void pickingListRegistration(Args _args)
    {
        WMSPickingRouteID pickingRouteID = 00061		// Route id to be picked
        InventTransId inventTransId = "000015303";          // LOT ID
        Qty pickQty = 14;                                   // Quantity to pick
        List list = new List(Types::String);
        WmsOrderTrans wmsOrderTrans;
        WmsOrderTrans wmsOrderTransNew;
    
        list.addEnd(pickingRouteID);
    
        // Change quantity
        ttsBegin;
        select forupdate wmsOrderTrans
            where wmsOrderTrans.RouteId         == pickingRouteID &&
                  wmsOrderTrans.inventTransId   == inventTransId &&
                  wmsOrderTrans.FullPallet      == NoYes::No &&
                 (wmsOrderTrans.ExpeditionStatus == WMSExpeditionStatus::Registered ||
                  wmsOrderTrans.ExpeditionStatus == WMSExpeditionStatus::Activated  ||
                  wmsOrderTrans.ExpeditionStatus == WMSExpeditionStatus::Started);
         
        // Split line
        wmsOrderTransNew = wmsOrderTrans.split(pickQty);
        ttsCommit;
    
        ttsBegin;
        // Cancel remaining line
        wmsOrderTrans.cancel();
        ttsCommit;
        
        WMSPickingRoute::finishMulti(list.pack());   // Note - this is not in a single tts, so some routes might be posted and others fail
    
        wmsDeliverPickedItems::checkDeliverPickedItems(pickingRouteID, list.pack());
    }


    Hope this helps,

    Heinz

  • Abhijeet Kr  Profile Picture
    Abhijeet Kr 60 on at
    RE: Picking List Registration through X++

    The job is great, just one question what to do in case we have with us value of quantity to picked instead of all. Similar to in picking list registration we can provide the number to be picked. What to do in this case thorugh code. 

  • Verified answer
    Heinz Schweda Profile Picture
    Heinz Schweda 1,365 on at
    RE: Picking List Registration through X++

    Hi,

    I've done this once with code similar to the following. Hope it helps.

    static void pickingListRegistration(Args _args)
    {
        WMSPickingRouteID pickingRouteID = "00061";    // Route id to be picked
        List list = new List(Types::String);
    
        list.addEnd(pickingRouteID);
    
        WMSPickingRoute::finishMulti(list.pack());   // Note - this is not in a single tts, so some routes might be posted and others fail
    
        wmsDeliverPickedItems::checkDeliverPickedItems(pickingRouteID, list.pack());
    }


    Regards,
    Heinz

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,836 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans