Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

This article applies to Microsoft Dynamics NAV for the Portuguese (pt) language locale.

Symptoms

Assume that you install the ERP Legal Certification update in the Portuguese version of Microsoft Dynamics NAV. When you run the Copy Document function on a sales credit memo, you receive the following error message:

The contents of the Hash field cannot be copied to the Cash-flow code field because the size of the Cash-flow code field is too small.

This problem occurs in the following products:

  • The Portuguese version of Microsoft Dynamics NAV 2009 R2

  • The Portuguese version of Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)

  • The Portuguese version of Microsoft Dynamics NAV 5.0 Service Pack 1 (SP1)

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 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.



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:

  1. Change the code in the Request Form function in the Copy Sales Document report (292) as follows:
    Existing code

    ...
    FromSalesHeader.TRANSFERFIELDS(FromReturnRcptHeader);
    DocType::"Posted Credit Memo":
    IF FromSalesCrMemoHeader.GET(DocNo) THEN

    // Delete the following line.
    FromSalesHeader.TRANSFERFIELDS(FromSalesCrMemoHeader);

    END;
    IF FromSalesHeader."No." = '' THEN
    DocNo := '';
    ...

    Replacement code

    ...
    FromSalesHeader.TRANSFERFIELDS(FromReturnRcptHeader);
    DocType::"Posted Credit Memo":
    IF FromSalesCrMemoHeader.GET(DocNo) THEN

    // Add the following line.
    CopyDocMgt.CopySalesCrMemoHeader(FromSalesHeader,FromSalesCrMemoHeader); // PT0001

    END;
    IF FromSalesHeader."No." = '' THEN
    DocNo := '';
    ...
  2. Change the code in the ValidateDocNo function in the Copy Sales Document report (292) as follows:
    Existing code

    ...
    DocType::"Posted Credit Memo":
    BEGIN
    FromSalesCrMemoHeader.GET(DocNo);

    // Delete the following line.
    FromSalesHeader.TRANSFERFIELDS(FromSalesCrMemoHeader);

    END;
    END;
    END;
    ...

    Replacement code

    ...
    DocType::"Posted Credit Memo":
    BEGIN
    FromSalesCrMemoHeader.GET(DocNo);

    // Add the following line.
    CopyDocMgt.CopySalesCrMemoHeader(FromSalesHeader,FromSalesCrMemoHeader); // PT0001

    END;
    END;
    END;
    ...
  3. Change the code in the CopySalesDoc function in the Copy Document Mgt. codeunit (6620) as follows:
    Existing code 1

    ...
    SalesDocType::"Posted Credit Memo":
    BEGIN
    ToSalesHeader.VALIDATE("Sell-to Customer No.",FromSalesCrMemoHeader."Sell-to Customer No.");

    // Delete the following line.
    TRANSFERFIELDS(FromSalesCrMemoHeader,FALSE);

    CopyFromPstdSalesDocDimToHdr(
    ToSalesHeader,FromDocType,FromSalesShptHeader,FromSalesInvHeader,
    FromReturnRcptHeader,FromSalesCrMemoHeader);
    ...

    Replacement code 1

    ...
    SalesDocType::"Posted Credit Memo":
    BEGIN
    ToSalesHeader.VALIDATE("Sell-to Customer No.",FromSalesCrMemoHeader."Sell-to Customer No.");

    // Add the following line.
    CopySalesCrMemoHeader(ToSalesHeader,FromSalesCrMemoHeader); // PT0001

    CopyFromPstdSalesDocDimToHdr(
    ToSalesHeader,FromDocType,FromSalesShptHeader,FromSalesInvHeader,
    FromReturnRcptHeader,FromSalesCrMemoHeader);
    ...

    Existing code 2

    ...
    END;
    SalesDocType::"Posted Credit Memo":
    BEGIN

    // Delete the following line.
    FromSalesHeader.TRANSFERFIELDS(FromSalesCrMemoHeader);

    FromSalesCrMemoLine.RESET;
    FromSalesCrMemoLine.SETRANGE("Document No.",FromSalesCrMemoHeader."No.");
    IF MoveNegLines THEN
    ...

    Replacement code 2

    ...
    END;
    SalesDocType::"Posted Credit Memo":
    BEGIN

    // Add the following line.
    CopySalesCrMemoHeader(FromSalesHeader,FromSalesCrMemoHeader); // PT0001

    FromSalesCrMemoLine.RESET;
    FromSalesCrMemoLine.SETRANGE("Document No.",FromSalesCrMemoHeader."No.");
    IF MoveNegLines THEN
    ...
  4. Change the code in the CopySalesCrMemoLinesToDoc function in the Copy Document Mgt. codeunit (6620) as follows:
    Existing code

    ...
    FromSalesCrMemoHeader.GET("Document No.");
    TransferOldExtLines.ClearLineNumbers;
    END;

    // Delete the following line.
    FromSalesHeader.TRANSFERFIELDS(FromSalesCrMemoHeader);

    FillExactCostRevLink :=
    IsSalesFillExactCostRevLink(ToSalesHeader,3,FromSalesHeader."Currency Code");
    FromSalesLine.TRANSFERFIELDS(FromSalesCrMemoLine);
    ...

    Replacement code

    ...
    FromSalesCrMemoHeader.GET("Document No.");
    TransferOldExtLines.ClearLineNumbers;
    END;

    // Add the following line.
    CopySalesCrMemoHeader(FromSalesHeader,FromSalesCrMemoHeader); // PT0001

    FillExactCostRevLink :=
    IsSalesFillExactCostRevLink(ToSalesHeader,3,FromSalesHeader."Currency Code");
    FromSalesLine.TRANSFERFIELDS(FromSalesCrMemoLine);
    ...
  5. Change the code in the Documentation in the Copy Document Mgt. codeunit (6620) as follows:
    Existing code

    ...
    FORMAT(ToSalesHeader."No."));
    END;

    BEGIN
    END.
    }
    }
    ...

    Replacement code

    ...
    FORMAT(ToSalesHeader."No."));
    END;

    // Add the following lines.
    PROCEDURE CopySalesCrMemoHeader@1110018(VAR SalesHeader@1110001 : Record 36;SalesCrMemoHeader@1110002 : Record 114);
    BEGIN
    WITH SalesHeader DO BEGIN
    "No." := SalesCrMemoHeader."No.";
    "Sell-to Customer No." := SalesCrMemoHeader."Sell-to Customer No.";
    "Bill-to Customer No." := SalesCrMemoHeader."Bill-to Customer No.";
    "Bill-to Name" := SalesCrMemoHeader."Bill-to Name";
    "Bill-to Name 2" := SalesCrMemoHeader."Bill-to Name 2";
    "Bill-to Address" := SalesCrMemoHeader."Bill-to Address";
    "Bill-to Address 2" := SalesCrMemoHeader."Bill-to Address 2";
    "Bill-to City" := SalesCrMemoHeader."Bill-to City";
    "Bill-to Contact" := SalesCrMemoHeader."Bill-to Contact";
    "Your Reference" := SalesCrMemoHeader."Your Reference";
    "Ship-to Code" := SalesCrMemoHeader."Ship-to Code";
    "Ship-to Name" := SalesCrMemoHeader."Ship-to Name";
    "Ship-to Name 2" := SalesCrMemoHeader."Ship-to Name 2";
    "Ship-to Address" := SalesCrMemoHeader."Ship-to Address";
    "Ship-to Address 2" := SalesCrMemoHeader."Ship-to Address 2";
    "Ship-to City" := SalesCrMemoHeader."Ship-to City";
    "Ship-to Contact" := SalesCrMemoHeader."Ship-to Contact";
    "Posting Date" := SalesCrMemoHeader."Posting Date";
    "Shipment Date" := SalesCrMemoHeader."Shipment Date";
    "Posting Description" := SalesCrMemoHeader."Posting Description";
    "Payment Terms Code" := SalesCrMemoHeader."Payment Terms Code";
    "Due Date" := SalesCrMemoHeader."Due Date";
    "Payment Discount %" := SalesCrMemoHeader."Payment Discount %";
    "Pmt. Discount Date" := SalesCrMemoHeader."Pmt. Discount Date";
    "Shipment Method Code" := SalesCrMemoHeader."Shipment Method Code";
    "Location Code" := SalesCrMemoHeader."Location Code";
    "Shortcut Dimension 1 Code" := SalesCrMemoHeader."Shortcut Dimension 1 Code";
    "Shortcut Dimension 2 Code" := SalesCrMemoHeader."Shortcut Dimension 2 Code";
    "Customer Posting Group" := SalesCrMemoHeader."Customer Posting Group";
    "Currency Code" := SalesCrMemoHeader."Currency Code";
    "Currency Factor" := SalesCrMemoHeader."Currency Factor";
    "Customer Price Group" := SalesCrMemoHeader."Customer Price Group";
    "Prices Including VAT" := SalesCrMemoHeader."Prices Including VAT";
    "Invoice Disc. Code" := SalesCrMemoHeader."Invoice Disc. Code";
    "Customer Disc. Group" := SalesCrMemoHeader."Customer Disc. Group";
    "Language Code" := SalesCrMemoHeader."Language Code";
    "Salesperson Code" := SalesCrMemoHeader."Salesperson Code";
    Comment := SalesCrMemoHeader.Comment;
    "No. Printed" := SalesCrMemoHeader."No. Printed";
    "On Hold" := SalesCrMemoHeader."On Hold";
    "Applies-to Doc. Type" := SalesCrMemoHeader."Applies-to Doc. Type";
    "Applies-to Doc. No." := SalesCrMemoHeader."Applies-to Doc. No.";
    "Bal. Account No." := SalesCrMemoHeader."Bal. Account No.";
    Amount := SalesCrMemoHeader.Amount;
    "Amount Including VAT" := SalesCrMemoHeader."Amount Including VAT";
    "VAT Registration No." := SalesCrMemoHeader."VAT Registration No.";
    "Reason Code" := SalesCrMemoHeader."Reason Code";
    "Gen. Bus. Posting Group" := SalesCrMemoHeader."Gen. Bus. Posting Group";
    "EU 3-Party Trade" := SalesCrMemoHeader."EU 3-Party Trade";
    "Transaction Type" := SalesCrMemoHeader."Transaction Type";
    "Transport Method" := SalesCrMemoHeader."Transport Method";
    "VAT Country/Region Code" := SalesCrMemoHeader."VAT Country/Region Code";
    "Sell-to Customer Name" := SalesCrMemoHeader."Sell-to Customer Name";
    "Sell-to Customer Name 2" := SalesCrMemoHeader."Sell-to Customer Name 2";
    "Sell-to Address" := SalesCrMemoHeader."Sell-to Address";
    "Sell-to Address 2" := SalesCrMemoHeader."Sell-to Address 2";
    "Sell-to City" := SalesCrMemoHeader."Sell-to City";
    "Sell-to Contact" := SalesCrMemoHeader."Sell-to Contact";
    "Bill-to Post Code" := SalesCrMemoHeader."Bill-to Post Code";
    "Bill-to County" := SalesCrMemoHeader."Bill-to County";
    "Bill-to Country/Region Code" := SalesCrMemoHeader."Bill-to Country/Region Code";
    "Sell-to Post Code" := SalesCrMemoHeader."Sell-to Post Code";
    "Sell-to County" := SalesCrMemoHeader."Sell-to County";
    "Sell-to Country/Region Code" := SalesCrMemoHeader."Sell-to Country/Region Code";
    "Ship-to Post Code" := SalesCrMemoHeader."Sell-to Post Code";
    "Ship-to County" := SalesCrMemoHeader."Ship-to County";
    "Ship-to Country/Region Code" := SalesCrMemoHeader."Ship-to Country/Region Code";
    "Exit Point" := SalesCrMemoHeader."Exit Point";
    Correction := SalesCrMemoHeader.Correction;
    "Document Date" := SalesCrMemoHeader."Document Date";
    "External Document No." := SalesCrMemoHeader."External Document No.";
    Area := SalesCrMemoHeader.Area;
    "Transaction Specification" := SalesCrMemoHeader."Transaction Specification";
    "Payment Method Code" := SalesCrMemoHeader."Payment Method Code";
    "No. Series" := SalesCrMemoHeader."Pre-Assigned No. Series";
    "Posting No. Series" := SalesCrMemoHeader."No. Series";
    "Tax Area Code" := SalesCrMemoHeader."Tax Area Code";
    "Tax Liable" := SalesCrMemoHeader."Tax Liable";
    "VAT Bus. Posting Group" := SalesCrMemoHeader."VAT Bus. Posting Group";
    "VAT Base Discount %" := SalesCrMemoHeader."VAT Base Discount %";
    "Prepmt. Cr. Memo No. Series" := SalesCrMemoHeader."Prepmt. Cr. Memo No. Series";
    "Campaign No." := SalesCrMemoHeader."Campaign No.";
    "Sell-to Contact No." := SalesCrMemoHeader."Sell-to Contact No.";
    "Bill-to Contact No." := SalesCrMemoHeader."Bill-to Contact No.";
    "Responsibility Center" := SalesCrMemoHeader."Responsibility Center";
    "Allow Line Disc." := SalesCrMemoHeader."Allow Line Disc.";
    "Get Shipment Used" := SalesCrMemoHeader."Get Return Receipt Used";
    "Amount in VAT Report" := SalesCrMemoHeader."Amount in VAT Report";
    "Applies-to Bill No." := SalesCrMemoHeader."Applies-to Bill No.";
    "Cust. Bank Acc. Code" := SalesCrMemoHeader."Cust. Bank Acc. Code";
    "Pay-at Code" := SalesCrMemoHeader."Pay-at Code";
    "Date Sent" := SalesCrMemoHeader."Date Sent";
    "Time Sent" := SalesCrMemoHeader."Time Sent";
    "BizTalk Document Sent" := SalesCrMemoHeader."BizTalk Document Sent";
    END;
    END;
    // End of the lines.

    BEGIN

    END.
    }
    }
    ...

Prerequisites

You must have one of the following products installed to apply this hotfix:

  • The Portuguese version of Microsoft Dynamics NAV 2009 R2

  • The Portuguese version of Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)

  • The Portuguese version of Microsoft Dynamics NAVĀ 5.0 Service Pack 1 (SP1)



Removal information

You cannot remove this hotfix.

Status

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

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.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×