Options

Get Sales Order Line of Prod. Order by Order Tracking

fraiserfraiser Member Posts: 5
Can someone tell me how to retrieve the sales order line of a production order line using order tracking management codeunit CU 99000778 ?

Comments

  • Options
    DaveTDaveT Member Posts: 1,039
    Hi Fraiser,

    The standard Nav is to use the reservation entry table for this. I have found problems with this in the past and have modified to order planning post to stamp the order number on the production order (custom field). This will get around issues such as tracing the production order to the sales order after the order is shipped/invoiced.

    Hope to helps.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • Options
    fraiserfraiser Member Posts: 5
    Thanks a lot! I spend some time using the toolkit to find out where the Order Tracking codeunit has been used. I found in XML Port 5500 a function "FindSalesOrders" which use the almost the same functionality as in the order tracking form. Do you think that could be a good way to find the sales order? Or do I have still problems with that so that I need to go your way customizing the orde planing?
  • Options
    DaveTDaveT Member Posts: 1,039
    Hi Fraiser,

    The XMLport 5500 is used to export the production order info to the graphical production scheduler. The base info you require is in the reservation entry. I deployed this on a site (V5.0) and found that in a small percentage of orders the link did not work. Also this will not work after the order is shipped/invoiced as the reservation entries will be cleared at this stage. It was easier for me to add the custom field.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • Options
    ajhvdbajhvdb Member Posts: 672
    This is what I use, you can have more then 1 orderline...
    Vars:
    LrTrackingEntryVirtual-Record-Order Tracking Entry	
    LcuTrackingMgt-Codeunit-OrderTrackingManagement	
    
    FindSalesOrders(VAR vPrProdOrdLine : Record "Prod. Order Line")
    LcuTrackingMgt.SetProdOrderLine(vPrProdOrdLine);
    
    IF LcuTrackingMgt.FindRecordsWithoutMessage THEN BEGIN
      LcuTrackingMgt.FindRecord('-',LrTrackingEntryVirtual);
      REPEAT
        GrTrackingEntryBuffer := LrTrackingEntryVirtual;
        GrTrackingEntryBuffer.INSERT;
      UNTIL LcuTrackingMgt.GetNextRecord(1,LrTrackingEntryVirtual) = 0;
    END;
    
Sign In or Register to comment.