Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

The drop shipment and the special order do not consider the defined information on the sales order when you use the requisition worksheet to create a purchase order or when you manually create a purchase order in Microsoft Dynamics NAV


View products that this article applies to.

This article applies to Microsoft Dynamics NAV for all language locales.

↑ Back to the top


Symptoms

In Microsoft Dynamics NAV, when you use the requisition worksheet to create a purchase order or when you manually create a purchase order, the drop shipment and the special orders do not consider the defined information on the related sales order. Therefore, the description, description 2 and the shipping address from the sales order header and lines do not follow through the pegged purchased order.
This problem occurs in the following products:
  • Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)
  • Microsoft Dynamics NAV 2009 R2

↑ Back to the top


Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is only intended to correct the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Dynamics NAV 2009 service pack or the next Microsoft Dynamics NAV version that contains this hotfix.

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Technical Support Professional for Microsoft Dynamics and related products determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.


↑ Back to the top




Installation information

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

Note Before you install this hotfix, verify that all Microsoft Navision client users are logged off the system. This includes Microsoft Navision Application Services (NAS) client users. You should be the only client user who is logged on when you implement this hotfix.

To implement this hotfix, you must have a developer license.

We recommend that the user account in the Windows Logins window or in the Database Logins window be assigned the "SUPER" role ID. If the user account cannot be assigned the "SUPER" role ID, you must verify that the user account has the following permissions:
  • The Modify permission for the object that you will be changing.
  • The Execute permission for the System Object ID 5210 object and for the System Object ID 9015 object.


Note You do not have to have rights to the data stores unless you have to perform data repair.

Code changes

Note Always test code fixes in a controlled environment before you apply the fixes to your production computers.
To resolve this problem, follow these steps:
Note Please read when you access codeunit (333), because it is different for North American version W1. Both are here with tags for the start and stop of each version.
  1. Change the code in the Purchase Header table (38) as follows:
    1. Add the following global text constant:
      Text051@1091 : TextConst 'ENU=The %1 field on the purchase order %2 must be the same as on sales order %3.';
    2. Add the following global variables:
      • Name: NameAddressDetails; DataType: Text[512];
      • Name: NameAddressDetails2; DataType: Text[512];
    3. Add the following function:
      CheckAndAddShipToAdd@46(SalesHeader@1000 : Record 36;ShowError@1001 : Boolean) : Boolean;

      VAR PurchLine2@1002 : Record 39;
      Add the following code for the function:
      IF ShowError THEN BEGIN
      PurchLine2.RESET;
      PurchLine2.SETRANGE("Document Type","Document Type"::Order);
      PurchLine2.SETRANGE("Document No.","No.");
      IF NOT PurchLine2.ISEMPTY THEN BEGIN
      IF "Ship-to Name" <>SalesHeader."Ship-to Name" THEN
      ERROR(Text051,FIELDCAPTION("Ship-to Name"),"No.",SalesHeader."No.");
      IF "Ship-to Name 2" <>SalesHeader."Ship-to Name 2" THEN
      ERROR(Text051,FIELDCAPTION("Ship-to Name 2"),"No.",SalesHeader."No.");
      IF ("Ship-to Address" <>SalesHeader."Ship-to Address") THEN
      ERROR(Text051,FIELDCAPTION("Ship-to Address"),"No.",SalesHeader."No.");
      IF ("Ship-to Address 2" <> SalesHeader."Ship-to Address 2") THEN
      ERROR(Text051,FIELDCAPTION("Ship-to Address 2"),"No.",SalesHeader."No.");
      IF ("Ship-to Post Code" <>SalesHeader."Ship-to Post Code") THEN
      ERROR(Text051,FIELDCAPTION("Ship-to Post Code"),"No.",SalesHeader."No.");
      IF ("Ship-to City" <>SalesHeader."Ship-to City") THEN
      ERROR(Text051,FIELDCAPTION("Ship-to City"),"No.",SalesHeader."No.");
      IF ("Ship-to Contact" <>SalesHeader."Ship-to Contact") THEN
      ERROR(Text051,FIELDCAPTION("Ship-to Contact"),"No.",SalesHeader."No.");
      END ELSE BEGIN
      // no purchase line exists
      "Ship-to Name" := SalesHeader."Ship-to Name";
      "Ship-to Name 2" := SalesHeader."Ship-to Name 2";
      "Ship-to Address" := SalesHeader."Ship-to Address";
      "Ship-to Address 2" := SalesHeader."Ship-to Address 2";
      "Ship-to Post Code" := SalesHeader."Ship-to Post Code";
      "Ship-to City" := SalesHeader."Ship-to City";
      "Ship-to Contact" := SalesHeader."Ship-to Contact";
      END;
      END ELSE BEGIN
      NameAddressDetails :=
      SalesHeader."Ship-to Name" + SalesHeader."Ship-to Name 2" +
      SalesHeader."Ship-to Address" + SalesHeader."Ship-to Address 2" +
      SalesHeader."Ship-to Post Code" + SalesHeader."Ship-to City" +
      SalesHeader."Ship-to Contact";
      IF NameAddressDetails2 = '' THEN
      NameAddressDetails2 := NameAddressDetails;
      EXIT(NameAddressDetails2 = NameAddressDetails);
      END;
    4. Add the following function:
      DropShptSplOrderExists@48(SalesHeader@1000 : Record 36) : Boolean;

      VAR SalesLine2@1001 : Record 37;

      Add the following code for the function:
      // returns TRUE if sales is either Drop Shipment of Special Order
      SalesLine2.RESET;
      SalesLine2.SETRANGE("Document Type",SalesLine2."Document Type"::Order);
      SalesLine2.SETRANGE("Document No.",SalesHeader."No.");
      SalesLine2.SETRANGE("Drop Shipment",TRUE);
      IF NOT SalesLine2.ISEMPTY THEN
      EXIT(TRUE);

      SalesLine2.SETRANGE("Drop Shipment");
      SalesLine2.SETRANGE("Special Order",TRUE);
      EXIT(NOT SalesLine2.ISEMPTY);
  2. Change the code in the InsertReqWkshLine function in the Get Sales Orders report (698) as follows:
    Existing code
    ...
    Quantity,
    ROUND(SalesLine."Outstanding Quantity" * SalesLine."Qty. per Unit of Measure" / "Qty. per Unit of Measure",0.00001));
    "Sales Order No." := SalesLine."Document No.";
    "Sales Order Line No." := SalesLine."Line No.";
    "Sell-to Customer No." := SalesLine."Sell-to Customer No.";
    SalesHeader.GET(1,SalesLine."Document No.");
    IF SpecOrder <>1 THEN
    "Ship-to Code" := SalesHeader."Ship-to Code";
    "Item Category Code" := SalesLine."Item Category Code";
    Nonstock := SalesLine.Nonstock;
    ...
    Replacement code
    ...
    Quantity,
    ROUND(SalesLine."Outstanding Quantity" * SalesLine."Qty. per Unit of Measure" / "Qty. per Unit of Measure",0.00001));
    "Sales Order No." := SalesLine."Document No.";
    "Sales Order Line No." := SalesLine."Line No.";
    "Sell-to Customer No." := SalesLine."Sell-to Customer No.";

    // Add the following lines.
    Description := SalesLine.Description;
    "Description 2" := SalesLine."Description 2";
    // End of the added lines.

    SalesHeader.GET(1,SalesLine."Document No.");
    IF SpecOrder <>1 THEN
    "Ship-to Code" := SalesHeader."Ship-to Code";
    "Item Category Code" := SalesLine."Item Category Code";
    Nonstock := SalesLine.Nonstock;
    ...
  3. Change the code in the Code function in the Purch.-Get Drop Shpt. codeunit (76) as follows:
    Existing code
    ...
    IF RECORDLEVELLOCKING THEN
    LOCKTABLE;
    SalesHeader.TESTFIELD("Document Type",SalesHeader."Document Type"::Order);
    TESTFIELD("Sell-to Customer No.",SalesHeader."Sell-to Customer No.");
    TESTFIELD("Ship-to Code",SalesHeader."Ship-to Code");

    PurchLine.LOCKTABLE;
    IF NOT RECORDLEVELLOCKING THEN
    LOCKTABLE(TRUE,TRUE); // Only version check
    SalesLine.LOCKTABLE;
    ...
    PurchLine."Document Type" := PurchLine."Document Type"::Order;
    PurchLine."Document No." := "No.";
    PurchLine."Line No." := NextLineNo;
    CopyDocMgt.TransfldsFromSalesToPurchLine(SalesLine,PurchLine);
    PurchLine.Description := SalesLine.Description;
    PurchLine."Sales Order No." := SalesLine."Document No.";
    PurchLine."Sales Order Line No." := SalesLine."Line No.";
    PurchLine."Drop Shipment" := TRUE;
    EVALUATE(PurchLine."Inbound Whse. Handling Time",'<0D>');
    PurchLine.VALIDATE("Inbound Whse. Handling Time");
    ...
    Replacement code
    ...
    IF RECORDLEVELLOCKING THEN
    LOCKTABLE;
    SalesHeader.TESTFIELD("Document Type",SalesHeader."Document Type"::Order);
    TESTFIELD("Sell-to Customer No.",SalesHeader."Sell-to Customer No.");
    TESTFIELD("Ship-to Code",SalesHeader."Ship-to Code");

    // Add the following lines.
    IF DropShptSplOrderExists(SalesHeader) THEN
    CheckAndAddShipToAdd(SalesHeader,TRUE);
    // End of the added lines.

    PurchLine.LOCKTABLE;
    IF NOT RECORDLEVELLOCKING THEN
    LOCKTABLE(TRUE,TRUE); // Only version check
    SalesLine.LOCKTABLE;
    ...
    PurchLine."Document Type" := PurchLine."Document Type"::Order;
    PurchLine."Document No." := "No.";
    PurchLine."Line No." := NextLineNo;
    CopyDocMgt.TransfldsFromSalesToPurchLine(SalesLine,PurchLine);
    PurchLine.Description := SalesLine.Description;

    // Add the following line.
    PurchLine."Description 2" := SalesLine."Description 2";
    // End of the added line.

    PurchLine."Sales Order No." := SalesLine."Document No.";
    PurchLine."Sales Order Line No." := SalesLine."Line No.";
    PurchLine."Drop Shipment" := TRUE;
    EVALUATE(PurchLine."Inbound Whse. Handling Time",'<0D>');
    PurchLine.VALIDATE("Inbound Whse. Handling Time");
    ...
  4. Change the code in the GetDescriptionAndRcptName function in the ReqJnlManagement codeunit (330) as follows:
    Existing code
    ...
    ReqLine.Type::"G/L Account":
    IF GLAcc.GET(ReqLine."No.") THEN
    Description := GLAcc.Name
    ELSE
    Description := '';

    // Delete the following lines.
    ReqLine.Type::Item:
    IF Item.GET(ReqLine."No.") THEN
    Description := Item.Description
    ELSE
    Description := '';
    // End of the deleted lines.

    END;
    END;

    IF ReqLine."Vendor No." = '' THEN
    BuyFromVendorName := ''
    ...
    Replacement code
    ...
    ReqLine.Type::"G/L Account":
    IF GLAcc.GET(ReqLine."No.") THEN
    Description := GLAcc.Name
    ELSE
    Description := '';
    END;
    END;

    IF ReqLine."Vendor No." = '' THEN
    BuyFromVendorName := ''
    ...
  5. NOTE Codeunit (333) has different code in Worldwide version vs North American version. Use correct section for your install.

    For BEGIN North American Version codeunit (333), change the code in the Req. Wksh.-Make Orders as follows:
    1. Add the following global variable:
      • Name: DropShptSpecialOrderExists;
      • DataType: Boolean;
    2. Add the following local variables in the InsertPurchOrderLinefunction:
      • Name: SalesHeader; DataType: Record (36);
      • Name: DropShptSplOrderDiffAddress; DataType: Boolean;
      • Name: CreateNewRecord; DataType: Boolean;
    3. Change the code in the InsertPurchOrderLinefunction as follows:
      Existing code
      ...
      // Delete the following lines.
      WITH ReqLine2 DO BEGIN
      IF ("No." = '') OR ("Vendor No." = '') OR (Quantity = 0) THEN
      EXIT;
      IF NOT PurchasingCode.GET("Purchasing Code") THEN
      PurchasingCode."Special Order" := FALSE;
      IF (PurchasingCode."Special Order" AND
      (PurchSetup."Combine Special Orders Default" =
      PurchSetup."Combine Special Orders Default"::"Always Combine") AND
      ((PurchOrderHeader."Buy-from Vendor No." <>"Vendor No.") OR
      (PurchOrderHeader."Location Code" <> "Location Code") OR
      (PurchOrderHeader."Currency Code" <>"Currency Code") OR
      (PrevPurchCode <>"Purchasing Code"))) OR
      (NOT PurchasingCode."Special Order" AND
      ((PurchOrderHeader."Buy-from Vendor No." <>"Vendor No.") OR
      (PurchOrderHeader."Location Code" <>"Location Code") OR
      (PurchOrderHeader."Sell-to Customer No." <>"Sell-to Customer No.") OR
      (PrevShipToCode <>"Ship-to Code") OR
      (PurchOrderHeader."Order Address Code" <> "Order Address Code") OR
      (PurchOrderHeader."Currency Code" <> "Currency Code") OR
      (PrevPurchCode <>"Purchasing Code")))
      THEN BEGIN
      InsertHeader(ReqLine2);
      LineCount := 0;
      NextLineNo := 0;
      PrevPurchCode := "Purchasing Code";
      PrevShipToCode := "Ship-to Code";
      END;
      IF (PurchasingCode."Special Order") AND
      (PurchSetup."Combine Special Orders Default" =
      PurchSetup."Combine Special Orders Default"::"Never Combine") AND
      ((PurchOrderHeader."Buy-from Vendor No." <>"Vendor No.") OR
      (PurchOrderHeader."Location Code" <> "Location Code") OR
      (PurchOrderHeader."Currency Code" <>"Currency Code") OR
      (PrevPurchCode <> "Purchasing Code")) THEN BEGIN
      InsertHeader(ReqLine2);
      END;
      // End of the deleted lines.

      LineCount := LineCount + 1;
      IF NOT PlanningResiliency THEN
      Window.UPDATE(4,LineCount);
      ...
      Replacement code
      ...
      // Add the following lines.
      WITH ReqLine2 DO BEGIN
      IF ("No." = '') OR ("Vendor No." = '') OR (Quantity = 0) THEN
      EXIT;
      DropShptSpecialOrderExists := FALSE;
      IF SalesHeader.GET(SalesHeader."Document Type"::Order,"Sales Order No.") THEN BEGIN
      DropShptSpecialOrderExists := PurchOrderHeader.DropShptSplOrderExists(SalesHeader);
      IF DropShptSpecialOrderExists THEN
      DropShptSplOrderDiffAddress :=
      NOT PurchOrderHeader.CheckAndAddShipToAdd(SalesHeader,FALSE);
      END;
      IF NOT PurchasingCode.GET("Purchasing Code") THEN
      PurchasingCode."Special Order" := FALSE;

      CreateNewRecord :=
      (PurchOrderHeader."Buy-from Vendor No." <>"Vendor No.") OR
      (PurchOrderHeader."Location Code" <> "Location Code") OR
      (PurchOrderHeader."Currency Code" <> "Currency Code") OR
      (PrevPurchCode <>"Purchasing Code") OR
      DropShptSplOrderDiffAddress;

      IF PurchasingCode."Special Order" AND CreateNewRecord THEN BEGIN
      InsertHeader(ReqLine2);
      IF PurchSetup."Combine Special Orders Default" =
      PurchSetup."Combine Special Orders Default"::"Always Combine"
      THEN BEGIN
      LineCount := 0;
      NextLineNo := 0;
      PrevPurchCode := "Purchasing Code";
      PrevShipToCode := "Ship-to Code";
      END;
      END;
      IF NOT PurchasingCode."Special Order" AND
      (CreateNewRecord OR
      (PurchOrderHeader."Sell-to Customer No." <>"Sell-to Customer No.") OR
      (PrevShipToCode <>"Ship-to Code") OR
      (PurchOrderHeader."Order Address Code" <>"Order Address Code"))
      THEN BEGIN
      InsertHeader(ReqLine2);
      LineCount := 0;
      NextLineNo := 0;
      PrevPurchCode := "Purchasing Code";
      PrevShipToCode := "Ship-to Code";
      END;
      // End of the added lines.

      LineCount := LineCount + 1;
      IF NOT PlanningResiliency THEN
      Window.UPDATE(4,LineCount);
      ...
    4. Change the code in the InsertHeader function as follows:
      Add the following local variable:
      • Name: SalesHeader;
      • DataType: Record (36);
      Existing code
      ...
      WITH ReqLine2 DO BEGIN
      OrderCounter := OrderCounter + 1;
      IF NOT PlanningResiliency THEN
      Window.UPDATE(3,OrderCounter);

      PurchSetup.GET;
      PurchSetup.TESTFIELD("Order Nos.");

      // Delete the following line.
      CLEAR(PurchOrderHeader);
      // End of the deleted line.

      PurchOrderHeader.INIT;
      PurchOrderHeader."Document Type" := PurchOrderHeader."Document Type"::Order;
      PurchOrderHeader."No." := '';
      ...
      PurchOrderHeader.VALIDATE("Location Code",ReqLine2."Location Code");
      END ELSE BEGIN
      PurchOrderHeader.VALIDATE("Location Code",ReqLine2."Location Code");
      PurchOrderHeader.SetShipToForSpecOrder;
      END;

      PurchOrderHeader.MODIFY;
      COMMIT;
      IF RECORDLEVELLOCKING THEN
      LOCKTABLE;
      PurchOrderHeader.MARK(TRUE);
      END;
      ...
      Replacement code
      ...
      WITH ReqLine2 DO BEGIN
      OrderCounter := OrderCounter + 1;
      IF NOT PlanningResiliency THEN
      Window.UPDATE(3,OrderCounter);

      PurchSetup.GET;
      PurchSetup.TESTFIELD("Order Nos.");
      PurchOrderHeader.INIT;
      PurchOrderHeader."Document Type" := PurchOrderHeader."Document Type"::Order;
      PurchOrderHeader."No." := '';
      ...
      PurchOrderHeader.VALIDATE("Location Code",ReqLine2."Location Code");
      END ELSE BEGIN
      PurchOrderHeader.VALIDATE("Location Code",ReqLine2."Location Code");
      PurchOrderHeader.SetShipToForSpecOrder;
      END;

      // Add the following lines.
      IF DropShptSpecialOrderExists THEN BEGIN
      SalesHeader.GET(SalesHeader."Document Type"::Order,"Sales Order No.");
      PurchOrderHeader."Ship-to Name" := SalesHeader."Ship-to Name";
      PurchOrderHeader."Ship-to Name 2" := SalesHeader."Ship-to Name 2";
      PurchOrderHeader."Ship-to Address" := SalesHeader."Ship-to Address";
      PurchOrderHeader."Ship-to Address 2" := SalesHeader."Ship-to Address 2";
      PurchOrderHeader."Ship-to Post Code" := SalesHeader."Ship-to Post Code";
      PurchOrderHeader."Ship-to City" := SalesHeader."Ship-to City";
      PurchOrderHeader."Ship-to Contact" := SalesHeader."Ship-to Contact";
      END;
      // End of the added lines.

      PurchOrderHeader.MODIFY;
      COMMIT;
      IF RECORDLEVELLOCKING THEN
      LOCKTABLE;
      PurchOrderHeader.MARK(TRUE);
      END;
      ...
    For BEGIN W1 Version codeunit (333), change the code in the Req. Wksh.-Make Order as follows:
    1. Add the following global variable:
      • Name: DropShptSpecialOrderExists;
      • DataType: Boolean;
    2. Add the following local variables in the InsertPurchOrderLinefunction:
      • Name: SalesHeader; DataType: Record (36);
      • Name: DropShptSplOrderDiffAddress; DataType: Boolean;
    3. Change the code in the InsertPurchOrderLinefunction as follows:
      Existing code
      ...
      WITH ReqLine2 DO BEGIN
      IF ("No." = '') OR ("Vendor No." = '') OR (Quantity = 0) THEN
      EXIT;

      IF (PurchOrderHeader."Buy-from Vendor No." <>"Vendor No.") OR
      (PurchOrderHeader."Sell-to Customer No."<> "Sell-to Customer No.") OR
      (PrevShipToCode <> "Ship-to Code") OR
      (PurchOrderHeader."Order Address Code" <>"Order Address Code") OR
      (PurchOrderHeader."Currency Code" <>"Currency Code") OR

      // Delete the following line.
      (PrevPurchCode <>"Purchasing Code")
      // End of the deleted line.

      THEN BEGIN
      InsertHeader(ReqLine2);
      LineCount := 0;
      NextLineNo := 0;
      PrevPurchCode := "Purchasing Code";
      PrevShipToCode := "Ship-to Code";
      END;
      ...
      Replacement code
      ...
      WITH ReqLine2 DO BEGIN
      IF ("No." = '') OR ("Vendor No." = '') OR (Quantity = 0) THEN
      EXIT;
      // Add the following lines.
      DropShptSpecialOrderExists := FALSE;
      IF SalesHeader.GET(SalesHeader."Document Type"::Order,"Sales Order No.") THEN BEGIN
      DropShptSpecialOrderExists := PurchOrderHeader.DropShptSplOrderExists(SalesHeader);
      IF DropShptSpecialOrderExists THEN
      DropShptSplOrderDiffAddress :=
      NOT PurchOrderHeader.CheckAndAddShipToAdd(SalesHeader,FALSE);
      END;
      // End of the added lines.
      IF (PurchOrderHeader."Buy-from Vendor No." <>"Vendor No.") OR
      (PurchOrderHeader."Sell-to Customer No."<> "Sell-to Customer No.") OR
      (PrevShipToCode <> "Ship-to Code") OR
      (PurchOrderHeader."Order Address Code" <>"Order Address Code") OR
      (PurchOrderHeader."Currency Code" <>"Currency Code") OR

      // Add the following lines.
      (PrevPurchCode <> "Purchasing Code") OR
      (DropShptSplOrderDiffAddress)
      // End of the added lines.

      THEN BEGIN
      InsertHeader(ReqLine2);
      LineCount := 0;
      NextLineNo := 0;
      PrevPurchCode := "Purchasing Code";
      PrevShipToCode := "Ship-to Code";
      END;
      ...
    4. Change the code in the InsertHeader function as follows:
      Add the following local variable:
      • Name: SalesHeader;
      • DataType: Record (36);
      Existing code
      ...
      END ELSE BEGIN
      PurchOrderHeader.VALIDATE("Location Code",ReqLine2."Location Code");
      PurchOrderHeader.SetShipToForSpecOrder;
      END;

      PurchOrderHeader.MODIFY;
      COMMIT;
      IF RECORDLEVELLOCKING THEN
      LOCKTABLE;
      PurchOrderHeader.MARK(TRUE);
      END;
      ...
      Replacement code
      ...
      END ELSE BEGIN
      PurchOrderHeader.VALIDATE("Location Code",ReqLine2."Location Code");
      PurchOrderHeader.SetShipToForSpecOrder;
      END;
      // Add the following lines.
      IF DropShptSpecialOrderExists THEN BEGIN
      IF SalesHeader.GET(SalesHeader."Document Type"::Order,"Sales Order No.") THEN BEGIN
      PurchOrderHeader."Ship-to Name" := SalesHeader."Ship-to Name";
      PurchOrderHeader."Ship-to Name 2" := SalesHeader."Ship-to Name 2";
      PurchOrderHeader."Ship-to Address" := SalesHeader."Ship-to Address";
      PurchOrderHeader."Ship-to Address 2" := SalesHeader."Ship-to Address 2";
      PurchOrderHeader."Ship-to Post Code" := SalesHeader."Ship-to Post Code";
      PurchOrderHeader."Ship-to City" := SalesHeader."Ship-to City";
      PurchOrderHeader."Ship-to Contact" := SalesHeader."Ship-to Contact";
      END;
      // End of the added lines.

      PurchOrderHeader.MODIFY;
      COMMIT;
      IF RECORDLEVELLOCKING THEN
      LOCKTABLE;
      PurchOrderHeader.MARK(TRUE);
      END;
      ...
  6. Change the code in the EnterPurchaseItemCrossRef function in the Dist. Integration codeunit (5702) as follows:
    Existing code
    ...
    IF Found THEN BEGIN
    "Cross-Reference No." := ItemCrossReference."Cross-Reference No.";
    "Unit of Measure (Cross Ref.)" := ItemCrossReference."Unit of Measure";
    "Cross-Reference Type" := ItemCrossReference."Cross-Reference Type";

    // Delete the following lines.
    IF ItemCrossReference.Description <>'' THEN BEGIN
    Description := ItemCrossReference.Description;
    "Description 2" := '';
    END;
    END ELSE BEGIN
    "Cross-Reference No." := '';
    "Cross-Reference Type" := "Cross-Reference Type"::" ";
    "Cross-Reference Type No." := '';
    IF "Variant Code" <>'' THEN BEGIN
    ItemVariant.GET("No.","Variant Code");
    Description := ItemVariant.Description;
    "Description 2" := ItemVariant."Description 2";
    END ELSE BEGIN
    Item.GET("No.");
    Description := Item.Description;
    "Description 2" := Item."Description 2";
    END;
    // End of the deleted lines.

    GetItemTranslation;
    END;
    END;
    ...
    Replacement code
    ...
    IF Found THEN BEGIN
    "Cross-Reference No." := ItemCrossReference."Cross-Reference No.";
    "Unit of Measure (Cross Ref.)" := ItemCrossReference."Unit of Measure";
    "Cross-Reference Type" := ItemCrossReference."Cross-Reference Type";

    // Add the following lines.
    "Cross-Reference Type No." := ItemCrossReference."Cross-Reference Type No.";
    END ELSE BEGIN
    "Cross-Reference No." := '';
    "Cross-Reference Type" := "Cross-Reference Type"::" ";
    "Cross-Reference Type No." := '';
    // End of the added lines.

    GetItemTranslation;
    END;
    END;
    ...
  7. Change the code in the GetSpecialOrders function in the Dist. Integration codeunit (5702) as follows:
    Existing code
    ...
    IF RECORDLEVELLOCKING THEN
    LOCKTABLE;
    SalesHeader.TESTFIELD("Document Type",SalesHeader."Document Type"::Order);
    TESTFIELD("Sell-to Customer No.",SalesHeader."Sell-to Customer No.");
    TESTFIELD("Ship-to Code",SalesHeader."Ship-to Code");

    // Delete the following line.
    PurchHeader.SetShipToForSpecOrder;
    // End of the deleted line.

    PurchLine.LOCKTABLE;
    IF NOT RECORDLEVELLOCKING THEN
    LOCKTABLE(TRUE,TRUE); // Only version check
    SalesLine.LOCKTABLE;
    ...
    Replacement code
    ...
    IF RECORDLEVELLOCKING THEN
    LOCKTABLE;
    SalesHeader.TESTFIELD("Document Type",SalesHeader."Document Type"::Order);
    TESTFIELD("Sell-to Customer No.",SalesHeader."Sell-to Customer No.");
    TESTFIELD("Ship-to Code",SalesHeader."Ship-to Code");
    // Add the following lines.
    IF DropShptSplOrderExists(SalesHeader) THEN
    CheckAndAddShipToAdd(SalesHeader,TRUE);
    // End of the added lines.

    PurchLine.LOCKTABLE;
    IF NOT RECORDLEVELLOCKING THEN
    LOCKTABLE(TRUE,TRUE); // Only version check
    SalesLine.LOCKTABLE;
    ...
  8. Change the code in the TransfldsFromSalesToPurchLine function in the Copy Document Mgt. codeunit (6620) as follows:
    Existing code
    ...
    "Expected Receipt Date" := FromSalesLine."Shipment Date";
    "Bin Code" := FromSalesLine."Bin Code";
    VALIDATE(Quantity,FromSalesLine."Outstanding Quantity");
    VALIDATE("Return Reason Code",FromSalesLine."Return Reason Code");
    VALIDATE("Direct Unit Cost");
    END;
    ...
    Replacement code
    ...
    "Expected Receipt Date" := FromSalesLine."Shipment Date";
    "Bin Code" := FromSalesLine."Bin Code";
    VALIDATE(Quantity,FromSalesLine."Outstanding Quantity");
    VALIDATE("Return Reason Code",FromSalesLine."Return Reason Code");
    VALIDATE("Direct Unit Cost");
    // Add the following lines.
    Description := FromSalesLine.Description;
    "Description 2" := FromSalesLine."Description 2";
    // End of the added lines.
    END;
    ...

Prerequisites

You must have one of the following products installed to apply this hotfix:
  • Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)
  • Microsoft Dynamics NAV 2009 R2


Removal information

You cannot remove this hotfix.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


References

VSTF DynamicsNAV SE: 238210

↑ Back to the top


Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

↑ Back to the top


Keywords: kbnoloc, kbsurveynew, kbmbspartner, kbqfe, kbmbscodefix, kbmbsquickpub, kb, kbmbsmigrate

↑ Back to the top

Article Info
Article ID : 2525331
Revision : 3
Created on : 1/31/2017
Published on : 1/31/2017
Exists online : False
Views : 280