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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Unpicking

(0) ShareShare
ReportReport
Posted on by

I currently have code which checks when a user tries to delete a item from released production order's and errors If there are currently picked items. I then ask the user if they want to Unpick these items. How would I go about Writing this. 

I figure I need to get the routing lines for the production order and then call a function called "Unpick" for example (I have one created for this) 

"For each routing line, call the relevant function  with the routing link code (SMT, TH etc) from the Routing Lines above."

These are the filters I use on the Routing page 

27.PNG

This is my code so far 


recWarehouseEntry.SETRANGE("Source No.","No.");
IF recWarehouseEntry.FINDFIRST THEN
CONFIRM('Cannot delete as there are picked items. Do you wish to unpick?', FALSE) = TRUE THEN

Any and all feedback is appreciated! 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Nareshwar Raju Vaneshwar Profile Picture
    5,596 on at

    Hi,

    Upon confirmation from the user, you can keep an indication probably a Boolean to mark these records as picked.

    Code will look something like this. Please understand that this isnt the full implementation. There can be other considerations too.

    *****

    recWarehouseEntry.SETRANGE("Source No.","No.");

    IF recWarehouseEntry.FINDFIRST THEN

    BEGIN

      IF CONFIRM('Cannot delete as there are picked items. Do you wish to unpick?') THEN

      BEGIN

         recWarehouseEntry.Picked := TRUE;

         recWarehouseEntry.MODIFY;

      END;

    END;

    *****

    Hope it helps.

  • Community Member Profile Picture
    on at

    Thanks, I've chosen a different direction however I've cam across this error. Any idea how to solve it I'm net to trying to pass the functions across. 

    28.PNG

  • Verified answer
    Community Member Profile Picture
    on at

    You need to pass the record variable as 5406 (Prod. Order Line) not 5405.

    Instead of rec, try to pass recProdLine variable. It should 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
TAHER_El_Mehdi Profile Picture

TAHER_El_Mehdi 2

#1
sliderxb Profile Picture

sliderxb 2

#1
broberts Profile Picture

broberts 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans