Gäller för
Dynamics NAV 2009

Den här artikeln gäller för Microsoft Dynamics NAV för alla länder och språkversioner.

Symptom

När du skapar ett servicekontrakt (inte förutbetalt) och ändra fakturan innan du bokför i Microsoft Dynamics NAV 2009 finns inkonsekventa data mellan servicetransaktioner och redovisningen. Det här problemet uppstår i följande produkter:

  • Microsoft Dynamics NAV 2009 R2

  • Microsoft Dynamics NAV 2009 servicepack 1

Lösning

Information om snabbkorrigeringen

En snabbkorrigering är nu tillgänglig från Microsoft. Den är endast avsedd att åtgärda det problem som beskrivs i denna artikel. Använd den bara på datorer där detta problem uppstår. Snabbkorrigeringen kan komma att testas igen. Om inte störs alltför mycket av detta problem rekommenderar vi att du väntar på Nästa service pack-versionen för Microsoft Dynamics NAV 2009 eller nästa Microsoft Dynamics NAV-version som innehåller den här snabbkorrigeringen.Obs! I särskilda fall, de avgifter som är normalt för support vara avgiftsfri om en supporttekniker för Microsoft Dynamics och relaterade produkter som bestämmer att en särskild uppdatering kan lösa ditt problem. De vanliga supportkostnaderna gäller för övriga supportfrågor och problem som inte berör den särskilda uppdateringen.

Installationsinformation

Microsoft tillhandahåller programmeringsexempel endast utan garanti varken uttryckliga eller underförstådda. Detta inkluderar men är inte begränsat till, underförstådda garantier om säljbarhet eller lämplighet för ett särskilt ändamål. Den här artikeln förutsätter att du är bekant med det programmeringsspråk som demonstreras och de verktyg som används för att skapa och felsöka procedurer. Microsofts supporttekniker kan hjälpa till att förklara funktionen hos en viss procedur. De kommer inte ändra dessa exempel för att ge ytterligare funktioner eller skapa procedurer som motsvarar dina speciella behov.Obs! Innan du installerar den här snabbkorrigeringen måste du kontrollera att alla användare av Microsoft Navision-klient har loggat ut. Detta inkluderar Microsoft Navision Application Services (NAS) klientanvändare. Du ska endast klientanvändare som är inloggad när du implementerar den här snabbkorrigeringen.Om du vill genomföra den här snabbkorrigeringen måste du ha en utvecklarlicens.Vi rekommenderar att tilldelas användarkontot i fönstret Windows-inloggningar eller i fönstret databasinloggningar "SUPER" roll-ID. Om användarkontot inte kan tilldelas "SUPER" roll-ID måste du kontrollera att användarkontot har följande behörigheter:

  • Ändra behörighet för objektet ändras.

  • Körbehörighet för systemet objektet ID 5210 objektet och objektet System objektet ID 9015 .

Obs! Du har inte behörighet för datalager inte data reparation.

Kod ändras

Obs! Alltid åtgärdas testa koden i en kontrollerad miljö innan du installerar korrigeringar för produktionsdatorer.Lös problemet så här:

  1. Ändra koden i tabellen Dokumentdimension (357) enligt följande:Befintlig kod 1

    ...      Text005@1009 : TextConst 'ENU=Canceled.';      Text006@1010 : TextConst 'ENU=You may have changed a dimension. Some lines are already shipped. When you post the line with the changed dimension to the general ledger, amounts on the Inventory Interim account will be out of balance when reported per dimension.\\Do you want to update the lines?';    PROCEDURE UpdateGlobalDimCode@25(GlobalDimCodeNo@1000 : Integer;"Table ID"@1001 : Integer;"Document Type"@1002 : Option;"Document No."@1003 : Code[20];"Line No."@1004 : Integer;NewDimValue@1005 : Code[20]);...

    Ersättningskod 1

    ...      Text005@1009 : TextConst 'ENU=Canceled.';      Text006@1010 : TextConst 'ENU=You may have changed a dimension. Some lines are already shipped. When you post the line with the changed dimension to the general ledger, amounts on the Inventory Interim account will be out of balance when reported per dimension.\\Do you want to update the lines?';      Text007@1011 : TextConst 'ENU=You cannot change the dimension because the document is based on a service contract.';    PROCEDURE UpdateGlobalDimCode@25(GlobalDimCodeNo@1000 : Integer;"Table ID"@1001 : Integer;"Document Type"@1002 : Option;"Document No."@1003 : Code[20];"Line No."@1004 : Integer;NewDimValue@1005 : Code[20]);...

    Befintlig kod 2

    ...    PROCEDURE VerifyLineDim@5(VAR DocDim@1000 : Record 357);    VAR      SalesLine@1001 : Record 37;      PurchaseLine@1002 : Record 39;    BEGIN      CASE "Table ID" OF        DATABASE::"Sales Line":          BEGIN            IF SalesLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN              IF (SalesLine."Qty. Shipped Not Invoiced" <> 0) OR (SalesLine."Return Rcd. Not Invd." <> 0) THEN                IF NOT CONFIRM(Text004,TRUE,SalesLine.TABLECAPTION) THEN                  ERROR(Text005)          END;        DATABASE::"Purchase Line":          BEGIN            IF PurchaseLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN              IF (PurchaseLine."Qty. Rcd. Not Invoiced" <> 0) OR (PurchaseLine."Return Qty. Shipped Not Invd." <> 0) THEN                IF NOT CONFIRM(Text004,TRUE,PurchaseLine.TABLECAPTION) THEN                  ERROR(Text005)          END;      END;    END;...

    Ersättningskod 2

    ...    PROCEDURE VerifyLineDim@5(VAR DocDim@1000 : Record 357);    VAR      SalesLine@1001 : Record 37;      PurchaseLine@1002 : Record 39;      ServiceHeader@1003 : Record 5900;      ServiceLine@1004 : Record 5902;    BEGIN      CASE "Table ID" OF        DATABASE::"Sales Line":          BEGIN            IF SalesLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN              IF (SalesLine."Qty. Shipped Not Invoiced" <> 0) OR (SalesLine."Return Rcd. Not Invd." <> 0) THEN                IF NOT CONFIRM(Text004,TRUE,SalesLine.TABLECAPTION) THEN                  ERROR(Text005)          END;        DATABASE::"Purchase Line":          BEGIN            IF PurchaseLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN              IF (PurchaseLine."Qty. Rcd. Not Invoiced" <> 0) OR (PurchaseLine."Return Qty. Shipped Not Invd." <> 0) THEN                IF NOT CONFIRM(Text004,TRUE,PurchaseLine.TABLECAPTION) THEN                  ERROR(Text005)          END;        DATABASE::"Service Header":          IF ServiceHeader.GET(DocDim."Document Type",DocDim."Document No.") AND (ServiceHeader."Contract No." <> '') THEN            ERROR(Text007);        DATABASE::"Service Line":          IF ServiceLine.GET(DocDim."Document Type",DocDim."Document No.",DocDim."Line No.") THEN            IF (ServiceLine."Contract No." <> '') THEN              ERROR(Text007);      END;    END;...
  2. Ändra koden i tabellen Serviceartikelrad (5902) enligt följande:Befintlig kod 1

    ...               IF (Quantity <> 0) AND ItemExists(xRec."No.") AND                  (("Spare Part Action" = "Spare Part Action"::"Component Replaced") OR                   ("Spare Part Action" = "Spare Part Action"::"Component Installed") OR                   ("Spare Part Action" = "Spare Part Action"::" "))               THEN                 ReserveServLine.VerifyChange(Rec,xRec);             END;    OnDelete=VAR...

    Ersättningskod 1

    ...               IF (Quantity <> 0) AND ItemExists(xRec."No.") AND                  (("Spare Part Action" = "Spare Part Action"::"Component Replaced") OR                   ("Spare Part Action" = "Spare Part Action"::"Component Installed") OR                   ("Spare Part Action" = "Spare Part Action"::" "))               THEN                 ReserveServLine.VerifyChange(Rec,xRec);               IF "Document Type" = ServiceLine."Document Type"::Invoice THEN                 IF ("Appl.-to Service Entry" <> 0) AND ("Contract No." <> '') THEN                   ERROR(Text046);             END;    OnDelete=VAR...

    Befintlig kod 2

    ...    { 5   ;   ;Type                ;Option        ;OnValidate=BEGIN                                                                GetServHeader;                                                                TESTFIELD("Qty. Shipped Not Invoiced",0);...

    Ersättningskod 2

    ...    { 5   ;   ;Type                ;Option        ;OnValidate=BEGIN                                                                IF ("Appl.-to Service Entry" <> 0) AND ("Contract No." <> '') THEN                                                                  ERROR(Text046);                                                                GetServHeader;...

    Befintlig kod 3

    ...    { 6   ;   ;No.                 ;Code20        ;TableRelation=IF (Type=CONST(" ")) "Standard Text"                                                                 ELSE IF (Type=CONST(G/L Account)) "G/L Account"                                                                 ELSE IF (Type=CONST(Item)) Item                                                                 ELSE IF (Type=CONST(Resource)) Resource                                                                 ELSE IF (Type=CONST(Cost)) "Service Cost";                                                   OnValidate=VAR                                                                ShowLocMessage@1000 : Boolean;                                                              BEGIN                                                                TESTFIELD("Qty. Shipped Not Invoiced",0);...

    Ersättningskod 3

    ...    { 6   ;   ;No.                 ;Code20        ;TableRelation=IF (Type=CONST(" ")) "Standard Text"                                                                 ELSE IF (Type=CONST(G/L Account)) "G/L Account"                                                                 ELSE IF (Type=CONST(Item)) Item                                                                 ELSE IF (Type=CONST(Resource)) Resource                                                                 ELSE IF (Type=CONST(Cost)) "Service Cost";                                                   OnValidate=VAR                                                                ShowLocMessage@1000 : Boolean;                                                              BEGIN                                                                IF ("Appl.-to Service Entry" <> 0) AND ("Contract No." <> '') THEN                                                                  ERROR(Text046);                                                                TESTFIELD("Qty. Shipped Not Invoiced",0);...

    Befintlig kod 4

    ...    { 22  ;   ;Unit Price          ;Decimal       ;OnValidate=BEGIN                                                                GetServHeader;                                                                IF ("Unit Price" > ServHeader."Max. Labor Unit Price") AND...

    Ersättningskod 4

    ...    { 22  ;   ;Unit Price          ;Decimal       ;OnValidate=BEGIN                                                                GetServHeader;                                                                IF ("Appl.-to Service Entry" > 0) AND (CurrFieldNo <> 0) THEN                                                                  ERROR(Text046,FIELDCAPTION("Unit Price"));                                                                IF ("Unit Price" > ServHeader."Max. Labor Unit Price") AND...

    Befintlig kod 5

    ...      Text043@1097 : TextConst 'ENU=You cannot change the value of the %1 field manually if %2 for this line is %3';      Text044@1012 : TextConst 'ENU=Do you want to split the resource line and use it to create resource lines\for the other service items with divided amounts?';      Text045@1099 : TextConst 'ENU=You cannot delete this service line because one or more service entries exist for this line.';...

    Ersättningskod 5

    ...      Text043@1097 : TextConst 'ENU=You cannot change the value of the %1 field manually if %2 for this line is %3';      Text044@1012 : TextConst 'ENU=Do you want to split the resource line and use it to create resource lines\for the other service items with divided amounts?';      Text045@1099 : TextConst 'ENU=You cannot delete this service line because one or more service entries exist for this line.';     Text046@1100 : TextConst 'ENU=You cannot modify the document because it is based on a service contract.';...

Förutsättningar

Du måste ha någon av följande produkter som har installerat den här snabbkorrigeringen:

  • Microsoft Dynamics NAV 2009 R2

  • Microsoft Dynamics NAV 2009 servicepack 1

Information om borttagning

Du kan inte ta bort den här snabbkorrigeringen.

Status

Microsoft har bekräftat att detta är ett problem i Microsoft-produkterna som nämns i avsnittet "Gäller".

Obs! Detta är en "SNABBPUBLICERING"-artikel skapad direkt från Microsoft support-organisationen. Informationen häri tillhandahålls i befintligt skick som svar på nya problem. Till följd av hastigheten för att göra det tillgängligt kan materialet innehålla typografiska fel och kan ändras när som helst utan föregående meddelande. Se Villkoren för användning för andra överväganden.

Behöver du mer hjälp?

Vill du ha fler alternativ?

Utforska prenumerationsförmåner, bläddra bland utbildningskurser, lär dig hur du skyddar din enhet med mera.