Applies ToMicrosoft Dynamics NAV 2009 R2

This article applies to Microsoft Dynamics NAV for the East European (ee) language locale.

Symptoms

When you try to set the Use VAT Date field to YES in the General Ledger Setup dialog box in the East European version of Microsoft Dynamics NAV 2009 R2, you receive the following error message:

You do not have permission to read the Service Header table.

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.

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. Delete the following local variables in the InitVATDate procedure in the General Ledger Setup table (98):

    • ArchiveMgt : Codeunit 5063

    • GenJnlPostLine : Codeunit 12

    • SalesPost : Codeunit 80

    • PurchPost : Codeunit 90

    • ServicePost : Codeunit 5980

  2. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: GLEntry

    • DataType: Record

    • Subtype: G/L Entry

  3. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: VATEntry

    • DataType: Record

    • Subtype: VAT Entry

  4. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: GenJnlLine

    • DataType: Record

    • Subtype: Gen. Journal Line

  5. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: SalesLine

    • DataType: Record

    • Subtype: Sales Line

  6. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: SalesInvHeader

    • DataType: Record

    • Subtype: Sales Invoice Header

  7. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: SalesInvLine

    • DataType: Record

    • Subtype: Sales Invoice Line

  8. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: SalesCrMemoHeader

    • DataType: Record

    • Subtype: Sales Cr. Memo Header

  9. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: SalesCrMemoLine

    • DataType: Record

    • Subtype: Sales Cr. Memo Line

  10. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: SalesArchiveLine

    • DataType: Record

    • Subtype: Sales Line Archive

  11. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: PurchLine

    • DataType: Record

    • Subtype: Purchase Line

  12. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: PurchInvHeader

    • DataType: Record

    • Subtype: Purch. Inv. Header

  13. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: PurchInvLine

    • DataType: Record

    • Subtype: Purch. Inv. Line

  14. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: PurchCrMemoHeader

    • DataType: Record

    • Subtype: Purch. Cr. Memo Hdr.

  15. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: PurchCrMemoLine

    • DataType: Record

    • Subtype: Purch. Cr. Memo Line

  16. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: PurchArchiveLine

    • DataType: Record

    • Subtype: Purchase Line Archive

  17. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: ServiceLine

    • DataType: Record

    • Subtype: Service Line

  18. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: ServiceInvHeader

    • DataType: Record

    • Subtype: Service Invoice Header

  19. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: ServiceInvLine

    • DataType: Record

    • Subtype: Service invoice Line

  20. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: ServiceCrMemoHeader

    • DataType: Record

    • Sbutype: Service Cr.Memo Header

  21. Add a new local variable in the InitVATDate procedure in the General Ledger Setup table (98), and then specify the variable as follows:

    • Name: ServiceCrMemoLine

    • DataType: Record

    • Subtype: Service Cr.Memo Line

  22. Change the code in the InitVATDate procedure in the General Ledger Setup table (98) as follows: Existing code

    ...// Delete the following lines.GenJnlPostLine.InitVATDate;IF SalesHeader.WRITEPERMISSION THENSalesPost.InitVATDate;IF PurchHeader.WRITEPERMISSION THENPurchPost.InitVATDate;IF SalesArchiveHeader.WRITEPERMISSION AND PurchArchiveHeader.WRITEPERMISSION THENArchiveMgt.InitVATDate;IF ServiceHeader.WRITEPERMISSION THENServicePost.InitVATDate;// End of the lines....

    Replacement code

    ...// Add the following lines.WITH GLEntry DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;UNTIL NEXT = 0;END;WITH GenJnlLine DO BEGINRESET;IF FINDSET(TRUE) THEN REPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;UNTIL NEXT = 0;END;WITH VATEntry DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;UNTIL NEXT = 0;END;WITH SalesHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;SalesLine.SETRANGE("Document Type","Document Type");SalesLine.SETRANGE("Document No.","No.");IF SalesLine.FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGINSalesLine."VAT Date" := "Posting Date";SalesLine.MODIFY;END;UNTIL SalesLine.NEXT = 0;UNTIL NEXT = 0;END;WITH SalesInvHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;SalesInvLine.SETRANGE("Document No.","No.");IF SalesInvLine.FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGINSalesInvLine."VAT Date" := "Posting Date";SalesInvLine.MODIFY;END;UNTIL SalesInvLine.NEXT = 0;UNTIL NEXT = 0;END;WITH SalesCrMemoHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;SalesCrMemoLine.SETRANGE("Document No.","No.");IF SalesCrMemoLine.FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGINSalesCrMemoLine."VAT Date" := "Posting Date";SalesCrMemoLine.MODIFY;END;UNTIL SalesCrMemoLine.NEXT = 0;UNTIL NEXT = 0;END;WITH SalesArchiveHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;SalesArchiveLine.SETRANGE("Document Type","Document Type");SalesArchiveLine.SETRANGE("Document No.","No.");IF SalesArchiveLine.FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGINSalesArchiveLine."VAT Date" := "Posting Date";SalesArchiveLine.MODIFY;END;UNTIL SalesArchiveLine.NEXT = 0;UNTIL NEXT = 0;END;WITH PurchHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;PurchLine.SETRANGE("Document Type","Document Type");PurchLine.SETRANGE("Document No.","No.");IF PurchLine.FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGINPurchLine."VAT Date" := "Posting Date";PurchLine.MODIFY;END;UNTIL PurchLine.NEXT = 0;UNTIL NEXT = 0;END;WITH PurchInvHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;PurchInvLine.SETRANGE("Document No.","No.");IF PurchInvLine.FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGINPurchInvLine."VAT Date" := "Posting Date";PurchInvLine.MODIFY;END;UNTIL PurchInvLine.NEXT = 0;UNTIL NEXT = 0;END;WITH PurchCrMemoHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;PurchCrMemoLine.SETRANGE("Document No.","No.");IF PurchCrMemoLine.FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGINPurchCrMemoLine."VAT Date" := "Posting Date";PurchCrMemoLine.MODIFY;END;UNTIL PurchCrMemoLine.NEXT = 0;UNTIL NEXT = 0;END;WITH PurchArchiveHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;PurchArchiveLine.SETRANGE("Document Type","Document Type");PurchArchiveLine.SETRANGE("Document No.","No.");IF PurchArchiveLine.FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGINPurchArchiveLine."VAT Date" := "Posting Date";PurchArchiveLine.MODIFY;END;UNTIL PurchArchiveLine.NEXT = 0;UNTIL NEXT = 0;END;WITH ServiceHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;ServiceLine.SETRANGE("Document Type","Document Type");ServiceLine.SETRANGE("Document No.","No.");IF ServiceLine.FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGINServiceLine."VAT Date" := "Posting Date";ServiceLine.MODIFY;END;UNTIL ServiceLine.NEXT = 0;UNTIL NEXT = 0;END;WITH ServiceInvHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;ServiceInvLine.SETRANGE("Document No.","No.");IF ServiceInvLine.FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGINServiceInvLine."VAT Date" := "Posting Date";ServiceInvLine.MODIFY;END;UNTIL ServiceInvLine.NEXT = 0;UNTIL NEXT = 0;END;WITH ServiceCrMemoHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;ServiceCrMemoLine.SETRANGE("Document No.","No.");IF ServiceCrMemoLine.FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGINServiceCrMemoLine."VAT Date" := "Posting Date";ServiceCrMemoLine.MODIFY;END;UNTIL ServiceCrMemoLine.NEXT = 0;UNTIL NEXT = 0;END;// End of the lines....
  23. Create the new  InitVATDate procedure in the General Ledger Setup table (98) as follows:

    PROCEDURE InitVATDate@1470030();VARGLEntry@1470002 : Record 17;VATEntry@1470001 : Record 254;GenJnlLine@1470000 : Record 81;BEGINWITH GLEntry DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;UNTIL NEXT = 0;END;WITH GenJnlLine DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;UNTIL NEXT = 0;END;WITH VATEntry DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;UNTIL NEXT = 0;END;END;
  24. Create the new InitVATDate procedure in the Sales-Post codeunit (80) as follows:

    PROCEDURE InitVATDate@1470020();VARSalesHeader@1470025 : Record 36;SalesLine@1470024 : Record 37;SalesInvHeader@1470023 : Record 112;SalesInvLine@1470022 : Record 113;SalesCrMemoHeader@1470021 : Record 114;SalesCrMemoLine@1470020 : Record 115;BEGINWITH SalesHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;SalesLine.SETRANGE("Document Type","Document Type");SalesLine.SETRANGE("Document No.","No.");SalesLine.SETRANGE("VAT Date",0D);SalesLine.MODIFYALL("VAT Date","Posting Date");UNTIL NEXT = 0;END;WITH SalesInvHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;SalesInvLine.SETRANGE("Document No.","No.");SalesInvLine.SETRANGE("VAT Date",0D);SalesInvLine.MODIFYALL("VAT Date","Posting Date");UNTIL NEXT = 0;END;WITH SalesCrMemoHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;SalesCrMemoLine.SETRANGE("Document No.","No.");SalesCrMemoLine.SETRANGE("VAT Date",0D);SalesCrMemoLine.MODIFYALL("VAT Date","Posting Date");UNTIL NEXT = 0;END;END;
  25. Create the new InitVATDate procedure in the Purch.-Post codeunit (90) as follows:

    PROCEDURE InitVATDate@1470020();VARPurchHeader@1470025 : Record 38;PurchLine@1470024 : Record 39;PurchInvHeader@1470023 : Record 122;PurchInvLine@1470022 : Record 123;PurchCrMemoHeader@1470021 : Record 124;PurchCrMemoLine@1470020 : Record 125;BEGINWITH PurchHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;PurchLine.SETRANGE("Document Type","Document Type");PurchLine.SETRANGE("Document No.","No.");PurchLine.SETRANGE("VAT Date",0D);PurchLine.MODIFYALL("VAT Date","Posting Date");UNTIL NEXT = 0;END;WITH PurchInvHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;PurchInvLine.SETRANGE("Document No.","No.");PurchInvLine.SETRANGE("VAT Date",0D);PurchInvLine.MODIFYALL("VAT Date","Posting Date");;UNTIL NEXT = 0;END;WITH PurchCrMemoHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;PurchCrMemoLine.SETRANGE("Document No.","No.");PurchCrMemoLine.SETRANGE("VAT Date",0D);PurchCrMemoLine.MODIFYALL("VAT Date","Posting Date");UNTIL NEXT = 0;END;END;
  26. Create the new InitVATDate procedure in the ArchiveManagement codeunit (5063) as follows:

    PROCEDURE InitVATDate@1470020();VARSalesArchiveHeader@1470021 : Record 5107;SalesArchiveLine@1470020 : Record 5108;PurchArchiveHeader@1470023 : Record 5109;PurchArchiveLine@1470022 : Record 5110;BEGINWITH SalesArchiveHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;SalesArchiveLine.SETRANGE("Document Type","Document Type");SalesArchiveLine.SETRANGE("Document No.","No.");SalesArchiveLine.SETRANGE("VAT Date",0D);SalesArchiveLine.MODIFYALL("VAT Date","Posting Date");UNTIL NEXT = 0;END;WITH PurchArchiveHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;PurchArchiveLine.SETRANGE("Document Type","Document Type");PurchArchiveLine.SETRANGE("Document No.","No.");PurchArchiveLine.SETRANGE("VAT Date",0D);PurchArchiveLine.MODIFYALL("VAT Date","Posting Date");UNTIL NEXT = 0;END;END;
  27. Create the new InitVATDate procedure in the Service-Post codeunit (5980) as follows:

    PROCEDURE InitVATDate@1470020();VARServiceHeader@1470025 : Record 5900;ServiceLine@1470024 : Record 5902;ServiceInvHeader@1470023 : Record 5992;ServiceInvLine@1470022 : Record 5993;ServiceCrMemoHeader@1470021 : Record 5994;ServiceCrMemoLine@1470020 : Record 5995;BEGINWITH ServiceHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;ServiceLine.SETRANGE("Document Type","Document Type");ServiceLine.SETRANGE("Document No.","No.");ServiceLine.SETRANGE("VAT Date",0D);ServiceLine.MODIFYALL("VAT Date","Posting Date");UNTIL NEXT = 0;END;WITH ServiceInvHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;ServiceInvLine.SETRANGE("Document No.","No.");ServiceInvLine.SETRANGE("VAT Date",0D);ServiceInvLine.MODIFYALL("VAT Date","Posting Date");UNTIL NEXT = 0;END;WITH ServiceCrMemoHeader DO BEGINRESET;IF FINDSET(TRUE) THENREPEATIF "VAT Date" = 0D THEN BEGIN"VAT Date" := "Posting Date";MODIFY;END;ServiceCrMemoLine.SETRANGE("Document No.","No.");ServiceCrMemoLine.SETRANGE("VAT Date",0D);ServiceCrMemoLine.MODIFYALL("VAT Date","Posting Date");UNTIL NEXT = 0;END;END;

Prerequisites

You must have the East European version of Microsoft Dynamics NAV 2009 R2 installed to apply this hotfix.

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.