Rettelse til OIOXML i 5.01

DKK 100,00

"KONTOOVERFØRSEL" string er ugyldig i den danske version af Microsoft Dynamics NAV 5.0. Læs mere her og nedenfpr kan guldmedlemmer download selve rettelsen til OIOXML.

Symptoms

You create an invoice in the Danish version of Microsoft Dynamics NAV. Then, you create an OIOXML file and send it to the customer. When the customer sends the file to the tax authorities, the customer receives an error message that the "KONTOOVERF¯RSEL" string is invalid.
 
Cause
This problem occurs because the "KONTOOVERFØRSEL" string in the following codeunits is invalid:
• The OIOXML Export Sales Invoice codeunit (13609)
• The OIOXML Exp. Issued Fin. Chrg codeunit (13611)
• The OIOXML Export Issued Reminder codeunit (13612)
• The OIOXML Export Service Invoice codeunit (13616)
The valid string should be "KONTOOVERFØRSEL".
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 service pack or the next 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 og download

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 install this hotfix, change the code in the following codeunits:

• The OIOXML Export Sales Invoice codeunit (13609)
• The OIOXML Exp. Issued Fin. Chrg codeunit (13611)
• The OIOXML Export Issued Reminder codeunit (13612)
• The OIOXML Export Service Invoice codeunit (13616)
The OIOXML Export Sales Invoice codeunit (13609)

The OIOXML Exp. Issued Fin. Chrg codeunit (13611)

1. In the OnRun(VAR Rec : Record "Issued Fin. Charge Memo Header") trigger, add the following C/AL global variable:
Name: SpecialChar157
DataType: Char
2. In the OnRun(VAR Rec : Record "Issued Fin. Charge Memo Header") trigger, change the code as follows.

Existing code 1

ReadGLSetup;
ReadCompanyInfo;
...

Replacement code 1

SpecialChar157 := 157; // Add this new line.
ReadGLSetup;
ReadCompanyInfo;

...

Existing code 2

...
'INDBETALINGSKORT',DocNameSpace,XMLNewChild,Prefix);
"Payment Channel"::"Account Transfer":
AddElement(XMLCurrNode,'PaymentChannelCode',
'KONTOOVERFØRSEL',DocNameSpace,XMLNewChild,Prefix);
"Payment Channel"::"National Clearing":
AddElement(XMLCurrNode,'PaymentChannelCode',
'NATIONAL CLEARING',DocNameSpace,XMLNewChild,Prefix);
...

Replacement code 2

...
'INDBETALINGSKORT',DocNameSpace,XMLNewChild,Prefix);
"Payment Channel"::"Account Transfer":
AddElement(XMLCurrNode,'PaymentChannelCode',
'KONTOOVERF' + FORMAT(SpecialChar157) + 'RSEL',DocNameSpace,XMLNewChild,Prefix); // This line is changed.
"Payment Channel"::"National Clearing":
AddElement(XMLCurrNode,'PaymentChannelCode',
'NATIONAL CLEARING',DocNameSpace,XMLNewChild,Prefix);
...

 
The OIOXML Export Issued Reminder codeunit (13612)
1. In the OnRun(VAR Rec : Record "Issued Reminder Header") trigger, add the following C/AL global variable:
Name: SpecialChar157
DataType: Char
2. In the OnRun(VAR Rec : Record "Issued Reminder Header") trigger, change the code as follows.
Existing code 1

ReadGLSetup;
ReadCompanyInfo;
...

Replacement code 1

SpecialChar157 := 157; // Add this new line.
ReadGLSetup;
ReadCompanyInfo;
...

Existing code 2

...
'INDBETALINGSKORT',DocNameSpace,XMLNewChild,Prefix);
"Payment Channel"::"Account Transfer":
AddElement(XMLCurrNode,'PaymentChannelCode',
'KONTOOVERFØRSEL',DocNameSpace,XMLNewChild,Prefix);
"Payment Channel"::"National Clearing":
AddElement(XMLCurrNode,'PaymentChannelCode',
'NATIONAL CLEARING',DocNameSpace,XMLNewChild,Prefix);
...

Replacement code 2

...
'INDBETALINGSKORT',DocNameSpace,XMLNewChild,Prefix);
"Payment Channel"::"Account Transfer":
AddElement(XMLCurrNode,'PaymentChannelCode',
'KONTOOVERF' + FORMAT(SpecialChar157) + 'RSEL',DocNameSpace,XMLNewChild,Prefix); // This line is changed.
"Payment Channel"::"National Clearing":
AddElement(XMLCurrNode,'PaymentChannelCode',
'NATIONAL CLEARING',DocNameSpace,XMLNewChild,Prefix)
...

The OIOXML Export Service Invoice codeunit (13616) 
1. In the OnRun(VAR Rec : Record "Service Invoice Header") trigger, add the following C/AL global variable:
Name: SpecialChar157
DataType: Char
2. In the OnRun(VAR Rec : Record "Service Invoice Header") trigger, change the code as follows.
Existing code 1

ReadGLSetup;
ReadCompanyInfo;
...

Replacement code 1

SpecialChar157 := 157; // Add this new line.
ReadGLSetup;
ReadCompanyInfo;
...

Existing code 2

...
'INDBETALINGSKORT',DocNameSpace,NewChild,Prefix);
"Payment Channel"::"Account Transfer":
AddElement(CurrNode,'PaymentChannelCode',
'KONTOOVERFØRSEL',DocNameSpace,NewChild,Prefix);
"Payment Channel"::"National Clearing":
AddElement(CurrNode,'PaymentChannelCode',
'NATIONAL CLEARING',DocNameSpace,NewChild,Prefix);
...

Replacement code 2

...
'INDBETALINGSKORT',DocNameSpace,NewChild,Prefix);
"Payment Channel"::"Account Transfer":
AddElement(CurrNode,'PaymentChannelCode',
'KONTOOVERF' + FORMAT(SpecialChar157) + 'RSEL',DocNameSpace,NewChild,Prefix); // Add this new line.
"Payment Channel"::"National Clearing":
AddElement(CurrNode,'PaymentChannelCode',
'NATIONAL CLEARING',DocNameSpace,NewChild,Prefix)
...
 
 
Prerequisites
 
To apply this hotfix, you must have one of the following products installed:
• The Danish version of Microsoft Dynamics NAV 4.0
• The Danish version of Microsoft Dynamics NAV 5.0
Restart information
You do not have to restart the computer after you apply this hotfix.
Status

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

1. In the OnRun(VAR Rec : Record "Sales Invoice Header") trigger, add the following C/AL global variables:

 

• Name: SpecialChar155
DataType: Char
• Name: SpecialChar157
DataType: Char
2. In the OnRun(VAR Rec : Record "Sales Invoice Header") trigger, change the code as follows.
 
Existing code 1

ReadGLSetup;
ReadCompanyInfo;

OIOXMLCheckSalesInvoice.RUN(Rec);
...

Replacement code 1

SpecialChar155 := 155; // Add this new line.
SpecialChar157 := 157; // Add this new line.
ReadGLSetup;
ReadCompanyInfo;

OIOXMLCheckSalesInvoice.RUN(Rec);
...

Existing code 2

...
CASE "Sell-to Contact Role" OF
"Sell-to Contact Role"::"Purchase Responsible":
AddElement(XMLCurrNode, 'Role', 'Indkøbsansvarlig', DocNameSpace, XMLNewChild, Prefix);
"Sell-to Contact Role"::Accountant:
AddElement(XMLCurrNode, 'Role', 'Bogholder', DocNameSpace, XMLNewChild, Prefix);
"Sell-to Contact Role"::"Budget Responsible":
AddElement(XMLCurrNode, 'Role', 'Budgetansvarlig', DocNameSpace, XMLNewChild, Prefix);
"Sell-to Contact Role"::Requisitioner:
AddElement(XMLCurrNode, 'Role', 'Rekvirent', DocNameSpace, XMLNewChild, Prefix);
END;
...

Replacement code 2

...
CASE "Sell-to Contact Role" OF
"Sell-to Contact Role"::"Purchase Responsible": // This line is changed.
AddElement(XMLCurrNode, 'Role', 'Indk' + FORMAT(SpecialChar155) + 'bsansvarlig', DocNameSpace, XMLNewChild, Prefix); // This line is changed.
"Sell-to Contact Role"::Accountant:
AddElement(XMLCurrNode, 'Role', 'Bogholder', DocNameSpace, XMLNewChild, Prefix);
"Sell-to Contact Role"::"Budget Responsible":
AddElement(XMLCurrNode, 'Role', 'Budgetansvarlig', DocNameSpace, XMLNewChild, Prefix);
"Sell-to Contact Role"::Requisitioner:
AddElement(XMLCurrNode, 'Role', 'Rekvirent', DocNameSpace, XMLNewChild, Prefix);
END;
...

Existing code 3

...
CASE "Payment Channel" OF
"Payment Channel"::"Payment Slip":
AddElement(XMLCurrNode,'PaymentChannelCode',
'INDBETALINGSKORT',DocNameSpace,XMLNewChild,Prefix);
"Payment Channel"::"Account Transfer":
AddElement(XMLCurrNode,'PaymentChannelCode',
'KONTOOVERFØRSEL',DocNameSpace,XMLNewChild,Prefix);
"Payment Channel"::"National Clearing":
AddElement(XMLCurrNode,'PaymentChannelCode',
'NATIONAL CLEARING',DocNameSpace,XMLNewChild,Prefix);
"Payment Channel"::"Direct Debit":
AddElement(XMLCurrNode,'PaymentChannelCode',
'DIRECT DEBET',DocNameSpace,XMLNewChild,Prefix);
END;
...

Replacement code 3

...
CASE "Payment Channel" OF
"Payment Channel"::"Payment Slip":
AddElement(XMLCurrNode,'PaymentChannelCode',
'INDBETALINGSKORT',DocNameSpace,XMLNewChild,Prefix);
"Payment Channel"::"Account Transfer": // This line is changed.
AddElement(XMLCurrNode,'PaymentChannelCode', // This line is changed.
'KONTOOVERF' + FORMAT(SpecialChar157) + 'RSEL',DocNameSpace,XMLNewChild,Prefix); // This line is changed.
"Payment Channel"::"National Clearing":
AddElement(XMLCurrNode,'PaymentChannelCode',
'NATIONAL CLEARING',DocNameSpace,XMLNewChild,Prefix);
"Payment Channel"::"Direct Debit":
AddElement(XMLCurrNode,'PaymentChannelCode',
'DIRECT DEBET',DocNameSpace,XMLNewChild,Prefix);
END;
...