Retain Dimensions in Requisition from Sales Order

Anna_FlorouAnna_Florou Member Posts: 9
Hi, I need help!

I have Items that have "Reordering Policy=Order" and "Reserve=Always".

I run "Create Plan" in Requisition and it creates Purchase Orders correctly, but does not carry to Requisition Lines the Global Dimensions from the Sales Order lines.

Any ideas????

Thanks :idea:
Anna in Doha

Comments

  • ara3nara3n Member Posts: 9,256
    Reqlines when populated only create the default dimension. You can modify and add some code to copy the dim from sales order lines
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • anafloroanafloro Member Posts: 3
    Thanks for the reply, but I was reffering to the two basic dimensions. They are NOT transferred to requisition lines. If In the Requisition sheet you fill them in, then they are still not transferred to the purchase order.
    I know I can make some code, my question is if this was a bug and there was a fix, or there is a set up I am missing.

    Thanx in advance

    Anna
    Anafloro
  • ara3nara3n Member Posts: 9,256
    The code in CU 333 does transfer the Dimensions from Requisition line to the purchase line.
      PurchOrderLine.INSERT;
    
      IF Reserve THEN
        ReserveBindingOrderToPurch(PurchOrderLine,ReqLine2);
    
      DocDim.SETRANGE("Table ID",DATABASE::"Purchase Line");
      DocDim.SETRANGE("Document Type",PurchOrderLine."Document Type");
      DocDim.SETRANGE("Document No.",PurchOrderLine."Document No.");
      DocDim.SETRANGE("Line No.",PurchOrderLine."Line No.");
    
      TempJnlLineDim.SETRANGE("Journal Line No.",ReqLine2."Line No.");
      IF TempJnlLineDim.FIND('-') THEN BEGIN
        REPEAT
          IF DocDim.GET(
             DATABASE::"Purchase Line",
             PurchOrderLine."Document Type",
             PurchOrderLine."Document No.",
             PurchOrderLine."Line No.",
             TempJnlLineDim."Dimension Code")
           THEN
            DocDim.DELETE;
          DocDim.INIT;
          DocDim."Table ID" := DATABASE::"Purchase Line";
          DocDim."Document Type" := PurchOrderLine."Document Type";
          DocDim."Document No." := PurchOrderLine."Document No.";
          DocDim."Line No." := PurchOrderLine."Line No.";
          DocDim."Dimension Code" := TempJnlLineDim."Dimension Code";
          DocDim."Dimension Value Code" := TempJnlLineDim."Dimension Value Code";
          DocDim.INSERT;
        UNTIL TempJnlLineDim.NEXT = 0;
      END;
    


    Check function InsertPurchOrderLine in CU 333.
    FYI when you carryout action historically it called a different CU in 99 million that created the PO. This was changed in 4.0 if I remember correctly and the records are passed to CU 333.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • AdamRoueAdamRoue Member Posts: 1,283
    When you use the function Drop Shipment/Special Order there is an options tab of where the dimensions are retrieved from, whether they are from the sales line or the item. If there is no direct link with the sales order as in this manner the dimension referenced is, as standard, from the item, the sales line is irrelevant as it is not linked. I do not believe the replenishment policy of order takes this into consideration (I am not saying however that it should not). I believe this would be considered an enhancement request by Microsoft and you would need to get it to work by modifying it.

    That said my memory tells me even if you retrieve the dimensions from the sales order when you convert the demand to a purchase order the dimensions get re-written from teh standard against the item :D Pretty sure we modified this area when we needed to use it (after bashing my head against a wall with Microsoft).
    The art of teaching is clarity and the art of learning is to listen
  • Anna_FlorouAnna_Florou Member Posts: 9
    Hi AdamRue,

    You are right, the dimensions are not carried forward although the items of the purchase orders are reserved to the sales order.

    Thanks

    Anna
    Anna in Doha
  • Anna_FlorouAnna_Florou Member Posts: 9
    Hi Ara3n,

    Thanks for the code, sooooo much!!!

    I will try it and let you know.

    Anna

    P.S. Seating on the Sun in Doha!!! :shock:
    Anna in Doha
  • ara3nara3n Member Posts: 9,256
    You are welcome. Although that is standard nav code.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.