Automatically Assign Lot Nos

shrekutshrekut Member Posts: 27
We have a new client in NAV 6.0 sp1 who wants Lot Nos and Bin Codes to be Automatically Assign to Sales Orders when the order is released. The lots should be assigned with Oldest Expatriation Date first (FIFO). I have been successful so far when Reservations are not used by inserting directly into the Reservation Entry table. My problem is when reservations are used there is a lot more to it. I have been studying the Item Tracking Lines form (6510) but it is so convoluted that I am having problems following the logic. Does anyone have experience or helpful suggestions on completing this task?

Thank you for any help!

Comments

  • ara3nara3n Member Posts: 9,256
    Do you have a senior developer who can help you?

    There are a couple of things to consider. First identifying the Lots that are not assigned, then inserting them into reservation entry.

    codeunit 99000830 Create Reserv. Entry

    This is how you insert reservation entries.
    CreateReservEntry.SetDates(
      0D,"Expiration Date");
    
    CreateReservEntry.CreateReservEntryFor(
      DATABASE::"Sales Line",
      "Document Type",
      "Document No.",
      '',
      0,
      "Line No.",
      "Qty. per Unit of Measure",
      "Qty. to Receive (Base)",
      '',
      LotNo,
      "Expiration Date");
    CreateReservEntry.CreateEntry("No.",
      "Variant Code",
      "Location Code",
      Description,
      "Shipment Date",
      "Order Date",0,2);
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • shrekutshrekut Member Posts: 27
    Thank you ara3n; with what you posted, I was able to development the final component of the solution. It tested well 3 separate times, of coerce, more testing is required. Wish me luck. If I experience any show stoppers, I will post them here.

    Thanks again for the help.



    Do you mean, all I had to do was ask the right person? ](*,)
Sign In or Register to comment.