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 "Remittance - import (BBS)" data port (15000060) always creates balance entries for each payment transaction in the Norwegian version of Microsoft Dynamics NAV


View products that this article applies to.

This article applies to Microsoft Dynamics NAV for the Norwegian (no) language locale.

↑ Back to the top


Symptoms

When you run the "Remittance - import (BBS)" data port (15000060) to import data in the Norwegian version of Microsoft Dynamics NAV, balance entries are always created for each payment transaction. The "Remittance - import (BBS)" data port (15000060) does not consider the settings in the Remittance Agreement Card dialog box or in the Remittance Account Card dialog box.
This problem occurs in the following products:
  • The Norwegian version of Microsoft Dynamics NAV 2009 R2
  • The Norwegian version of Microsoft Dynamics NAV 2009 Service Pack 1 (SP1)
  • The Norwegian version of Microsoft Dynamics NAV 5.0 Service Pack 1 (SP1)

↑ 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 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:
  1. Change the code in the ProcessBETFOR23and04 function in the Remittance - import (Bank) data port (15000050) as follows:
    Existing code
    ...
    // Update Waiting journal
    WaitingJournal.VALIDATE(WaitingJournal."Payment Order ID - Settled",PaymOrder.ID);
    WaitingJournal.VALIDATE("Journal, Settlement Template",GenJournalLine."Journal Template Name");
    WaitingJournal.VALIDATE("Journal - Settlement",GenJournalLine."Journal Batch Name");
    WaitingJournal.MODIFY(TRUE);

    // Update round off
    END ELSE // This error should not occur.
    ERROR(Text026,ReturnCode);
    ...
    Replacement code
    ...
    // Update Waiting journal
    WaitingJournal.VALIDATE(WaitingJournal."Payment Order ID - Settled",PaymOrder.ID);
    WaitingJournal.VALIDATE("Journal, Settlement Template",GenJournalLine."Journal Template Name");
    WaitingJournal.VALIDATE("Journal - Settlement",GenJournalLine."Journal Batch Name");

    // Add the following line.
    WaitingJournal."Remittance Status" := WaitingJournal."Remittance Status"::Sent;

    WaitingJournal.MODIFY(TRUE);

    // Update round off
    END ELSE // This error should not occur.
    ERROR(Text026,ReturnCode);
    ...
  2. Change the code in the CreateBalanceEntry function in the Remittance - import (Bank) data port (15000050) as follows:
    Existing code
    ...
    BalanceEntryAmount := BalanceEntryAmountLCY
    ELSE
    BalanceEntryAmount := ROUND(BalanceEntryAmountLCY * GenJournalLine."Currency Factor");
    GenJournalLine.VALIDATE(Amount,-BalanceEntryAmount);
    GenJournalLine.VALIDATE("Document No.",TransDocumentNo);
    CASE LatestRemAgreement."New Document Per." OF
    LatestRemAgreement."New Document Per."::Date:
    GenJournalLine.VALIDATE(
    Description,STRSUBSTNO(Text031,LatestDate));
    LatestRemAgreement."New Document Per."::Vendor:
    ...
    Replacement code
    ...
    BalanceEntryAmount := BalanceEntryAmountLCY
    ELSE
    BalanceEntryAmount := ROUND(BalanceEntryAmountLCY * GenJournalLine."Currency Factor");
    GenJournalLine.VALIDATE(Amount,-BalanceEntryAmount);
    GenJournalLine.VALIDATE("Document No.",TransDocumentNo);

    // Add the following lines.
    GenJournalLine.VALIDATE("Remittance Account Code",WaitingJournal."Remittance Account Code");
    GenJournalLine.VALIDATE("Remittance Agreement Code",WaitingJournal."Remittance Agreement Code");
    // End of the lines.

    CASE LatestRemAgreement."New Document Per." OF
    LatestRemAgreement."New Document Per."::Date:
    GenJournalLine.VALIDATE(
    Description,STRSUBSTNO(Text031,LatestDate));
    LatestRemAgreement."New Document Per."::Vendor:
    ...
  3. Change the code in Data Item Number 1 in the Remittance - import (BBS) data port (15000060) as follows:
    Existing code
    ...
    ERROR(Text005,FileImp,Recordtype);
    END;
    END;

    OnPostDataItem=BEGIN
    // Recordtype89 must be read by the end of import:
    IF NOT Recordtype89IsRead THEN
    ERROR(
    Text006 +
    Text007,FileImp);
    ...
    Replacement code
    ...
    ERROR(Text005,FileImp,Recordtype);
    END;
    END;

    OnPostDataItem=BEGIN

    // Add the following line.
    CreateBalanceEntry(TransBBSDate,'',WaitingJournal."Account No.",RemAccount,RemAgreement);

    // Recordtype89 must be read by the end of import:
    IF NOT Recordtype89IsRead THEN
    ERROR(
    Text006 +
    Text007,FileImp);
    ...
  4. Change the code in the ProcessTransaction function in the Remittance - import (BBS) data port (15000060) as follows:
    Existing code
    ...
    WaitingJournal.VALIDATE("BBS Shipment No.",ShipmentNo);
    WaitingJournal.VALIDATE("BBS Payment Order No.",PaymOrderNo);
    WaitingJournal.VALIDATE("BBS Transaction No.",TransNo);
    WaitingJournal.VALIDATE("Journal, Settlement Template",GenJnlLine."Journal Template Name");
    WaitingJournal.VALIDATE("Journal - Settlement",GenJnlLine."Journal Batch Name");

    // Delete the following lines.
    WaitingJournal.MODIFY(TRUE);
    UNTIL WaitingJournal.NEXT = 0;

    CreateBalanceEntry(TransBBSDate,'',WaitingJournal."Account No.",RemAccount,RemAgreement);
    // End of the lines.

    END;

    LOCAL PROCEDURE CreatePaymOrder@6();
    VAR
    NextPaymOrderID@1000000000 : Integer;
    ...
    Replacement code
    ...
    WaitingJournal.VALIDATE("BBS Shipment No.",ShipmentNo);
    WaitingJournal.VALIDATE("BBS Payment Order No.",PaymOrderNo);
    WaitingJournal.VALIDATE("BBS Transaction No.",TransNo);
    WaitingJournal.VALIDATE("Journal, Settlement Template",GenJnlLine."Journal Template Name");
    WaitingJournal.VALIDATE("Journal - Settlement",GenJnlLine."Journal Batch Name");

    // Add the following lines.
    WaitingJournal."Remittance Status" := WaitingJournal."Remittance Status"::Sent;

    WaitingJournal.MODIFY(TRUE);
    UNTIL WaitingJournal.NEXT = 0;
    // End of the lines.

    END;

    LOCAL PROCEDURE CreatePaymOrder@6();
    VAR
    NextPaymOrderID@1000000000 : Integer;
    ...
  5. Change the code in the CreateBalanceEntry function in the Remittance - import (BBS) data port (15000060) as follows:
    Existing code
    ...
    GenJnlLine.VALIDATE("Posting Date",LatestDate);
    GenJnlLine.VALIDATE("Account Type",LatestRemAccount."Account Type");
    GenJnlLine.VALIDATE("Account No.",LatestRemAccount."Account No.");
    GenJnlLine.VALIDATE(Amount,-BalanceEntryAmountLCY);
    GenJnlLine.VALIDATE("Document No.",TransDocumentNo);
    CASE LatestRemAgreement."New Document Per." OF
    LatestRemAgreement."New Document Per."::Date:
    GenJnlLine.VALIDATE(
    Description,STRSUBSTNO(Text012,LatestDate));
    LatestRemAgreement."New Document Per."::Vendor:
    ...
    Replacement code
    ...
    GenJnlLine.VALIDATE("Posting Date",LatestDate);
    GenJnlLine.VALIDATE("Account Type",LatestRemAccount."Account Type");
    GenJnlLine.VALIDATE("Account No.",LatestRemAccount."Account No.");
    GenJnlLine.VALIDATE(Amount,-BalanceEntryAmountLCY);
    GenJnlLine.VALIDATE("Document No.",TransDocumentNo);

    // Add the following lines.
    GenJnlLine.VALIDATE("Remittance Account Code",WaitingJournal."Remittance Account Code");
    GenJnlLine.VALIDATE("Remittance Agreement Code",WaitingJournal."Remittance Agreement Code");
    // End of the lines.

    CASE LatestRemAgreement."New Document Per." OF
    LatestRemAgreement."New Document Per."::Date:
    GenJnlLine.VALIDATE(
    Description,STRSUBSTNO(Text012,LatestDate));
    LatestRemAgreement."New Document Per."::Vendor:
    ...
  6. Change the code in the NewTransaction function in the Remittance - import (BBS) data port (15000060) as follows:
    Existing code
    ...
    BEGIN
    // Initialize transaction import.
    // Called before import is started, after a transaction in the file is closed (BETFOR99)
    // and before the next transaction from the same file starts.
    First := TRUE; //Control of balance entry;

    // Delete the following line.
    BalanceEntryAmountLCY := 0;

    LatestDate := 0D;
    LatestVend := '';
    CLEAR(LatestRemAccount);
    END;
    ...
    Replacement code
    ...
    BEGIN
    // Initialize transaction import.
    // Called before import is started, after a transaction in the file is closed (BETFOR99)
    // and before the next transaction from the same file starts.
    First := TRUE; //Control of balance entry;

    LatestDate := 0D;
    LatestVend := '';
    CLEAR(LatestRemAccount);
    END;
    ...
  7. Change the code in the FindFiles function in the Rem. payment order - import report (15000003) as follows:
    Existing code
    ...
    FilePath := RemTools.FindPath(ReturnFileSetup."Return File Name");
    File.SETFILTER(Path,FilePath); // not case-sensitive
    File.SETRANGE("Is a file",TRUE);
    // Copy all these files to a temporary table with file name in lower-case letters:
    FileCopy.DELETEALL;

    // Delete the following lines.
    IF File.FIND('-') THEN
    REPEAT
    FileCopy.Name := LOWERCASE(File.Name);
    FileCopy.Size := File.Size;
    FileCopy.Date := File.Date;
    FileCopy.Time := File.Time;
    FileCopy.INSERT;
    UNTIL File.NEXT = 0;
    // End of the lines.

    // From now on use copies of file names :
    FileCopy.SETFILTER(Name,LOWERCASE(RemTools.FindFilename(ReturnFileSetup."Return File Name")));
    IF FileCopy.FIND('-') THEN
    REPEAT
    ReturnFiles.INIT;
    ...
    Replacement code
    ...
    FilePath := RemTools.FindPath(ReturnFileSetup."Return File Name");
    File.SETFILTER(Path,FilePath); // not case-sensitive
    File.SETRANGE("Is a file",TRUE);
    // Copy all these files to a temporary table with file name in lower-case letters:
    FileCopy.DELETEALL;

    // Add the following lines.
    IF EXISTS(FilePath) THEN BEGIN
    IF File.FIND('-') THEN
    REPEAT
    FileCopy.Name := LOWERCASE(File.Name);
    FileCopy.Size := File.Size;
    FileCopy.Date := File.Date;
    FileCopy.Time := File.Time;
    FileCopy.INSERT;
    UNTIL File.NEXT = 0;
    END;
    // End of the lines.

    // From now on use copies of file names :
    FileCopy.SETFILTER(Name,LOWERCASE(RemTools.FindFilename(ReturnFileSetup."Return File Name")));
    IF FileCopy.FIND('-') THEN
    REPEAT
    ReturnFiles.INIT;
    ...

Prerequisites

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

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


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: kbmbscodefix, kbnoloc, kbsurveynew, kbqfe, kbmbsmigrate, kbmbspartner, kb, kbmbsquickpub

↑ Back to the top

Article Info
Article ID : 2694170
Revision : 1
Created on : 1/7/2017
Published on : 6/21/2012
Exists online : False
Views : 232