Upgrade error. 4.0 SP3 to 5.0 SP1

vacendak
Member Posts: 4
In Step 1 I get an error:
At least one Job Ledger Entry applied and not closed where Job No. = 898, Phase Code = , Task Code = , Step Code = exists.
This is Text017 in the following code i codeunit 104045 in funcion CheckJobs
WITH JobLedgerEntry DO BEGIN
SETCURRENTKEY("Related to Budget","Job No.","Entry Type","Phase Code","Task Code","Step Code");
JobLedgerEntry2.SETCURRENTKEY("Related to Budget","Job No.","Entry Type","Phase Code","Task Code","Step Code");
SETFILTER("Amt. Posted to G/L",'<>0');
IF FINDSET THEN
REPEAT
SETRANGE("Related to Budget","Related to Budget");
SETRANGE("Job No.","Job No.");
SETRANGE("Entry Type","Entry Type");
SETRANGE("Phase Code","Phase Code");
SETRANGE("Task Code","Task Code");
SETRANGE("Step Code","Step Code");
IF NOT TempJobTaskPhaseStepComb.GET("Job No.","Phase Code","Task Code","Step Code") THEN BEGIN
SETRANGE("Amt. Recognized",0);
IF FINDFIRST THEN BEGIN
UpgradeErrorLog.SetError(
STRSUBSTNO(
Text016,
TABLECAPTION,
FIELDCAPTION("Job No."),"Job No.",
FIELDCAPTION("Phase Code"),"Phase Code",
FIELDCAPTION("Task Code"),"Task Code",
FIELDCAPTION("Step Code"),"Step Code"),
DATABASE::"Job Ledger Entry",'');
TempJobTaskPhaseStepComb."Job No." := "Job No.";
TempJobTaskPhaseStepComb."Phase Code" := "Phase Code";
TempJobTaskPhaseStepComb."Task Code" := "Task Code";
TempJobTaskPhaseStepComb."Step Code" := "Step Code";
TempJobTaskPhaseStepComb.INSERT;
END ELSE BEGIN
JobLedgerEntry2.SETRANGE("Job No.","Job No.");
JobLedgerEntry2.SETRANGE("Phase Code","Phase Code");
JobLedgerEntry2.SETRANGE("Task Code","Task Code");
JobLedgerEntry2.SETRANGE("Step Code","Step Code");
JobLedgerEntry2.SETRANGE("Amt. Recognized",0);
IF JobLedgerEntry2.FINDSET THEN BEGIN
Job.GET("Job No.");
REPEAT
IF ((JobLedgerEntry2."Entry Type" = "Entry Type"::Usage) AND
(((Job."Job Usage Posting" = Job."Job Usage Posting"::Costs) AND
(JobLedgerEntry2."Total Cost" <> 0)) OR
((Job."Job Usage Posting" = Job."Job Usage Posting"::Prices) AND
(JobLedgerEntry2."Total Price" <> 0)))) OR
((JobLedgerEntry2."Entry Type" = "Entry Type"::Sale) AND
JobLedgerEntry2.Chargeable AND
(JobLedgerEntry2."Total Price" <> 0))
THEN BEGIN
UpgradeErrorLog.SetError(
STRSUBSTNO(
Text016,
TABLECAPTION,
FIELDCAPTION("Job No."),"Job No.",
FIELDCAPTION("Phase Code"),"Phase Code",
FIELDCAPTION("Task Code"),"Task Code",
FIELDCAPTION("Step Code"),"Step Code"),
DATABASE::"Job Ledger Entry",'');
TempJobTaskPhaseStepComb."Job No." := "Job No.";
TempJobTaskPhaseStepComb."Phase Code" := "Phase Code";
TempJobTaskPhaseStepComb."Task Code" := "Task Code";
TempJobTaskPhaseStepComb."Step Code" := "Step Code";
TempJobTaskPhaseStepComb.INSERT;
JobLedgerEntry2.FINDLAST;
END;
UNTIL JobLedgerEntry2.NEXT = 0;
END;
END;
END;
SETRANGE("Amt. Recognized");
FINDLAST;
SETRANGE("Related to Budget");
SETRANGE("Job No.");
SETRANGE("Entry Type");
SETRANGE("Phase Code");
SETRANGE("Task Code");
SETRANGE("Step Code");
UNTIL NEXT = 0;
RESET;
SETCURRENTKEY("Related to Budget","Job No.","Entry Type","Phase Code","Task Code","Step Code");
IF FINDSET THEN
REPEAT
SETRANGE("Related to Budget","Related to Budget");
SETRANGE("Job No.","Job No.");
SETRANGE("Phase Code","Phase Code");
SETRANGE("Task Code","Task Code");
SETRANGE("Step Code","Step Code");
SETRANGE(Open,TRUE);
IF FINDSET THEN
REPEAT
JobLedgerEntry2.RESET;
JobLedgerEntry2.SETRANGE("Job No.","Job No.");
JobLedgerEntry2.SETRANGE("Closed by Entry No.","Entry No.");
IF JobLedgerEntry2.FINDFIRST THEN BEGIN
UpgradeErrorLog.SetError(
STRSUBSTNO(
Text017,
TABLECAPTION,
FIELDCAPTION("Job No."),"Job No.",
FIELDCAPTION("Phase Code"),"Phase Code",
FIELDCAPTION("Task Code"),"Task Code",
FIELDCAPTION("Step Code"),"Step Code"), DATABASE::"Job Ledger Entry",'');
FINDLAST;
END;
UNTIL NEXT = 0;
SETRANGE(Open);
FINDLAST;
SETRANGE("Step Code");
SETRANGE("Task Code");
SETRANGE("Phase Code");
SETRANGE("Job No.");
SETRANGE("Related to Budget");
UNTIL NEXT = 0;
END;
The error occurs because an entry of type Usage is closed by an entry of type Sale, and this entry is only partially applied (Remaining Amount > 0) and is therefore Open.
This kind of entry is apparently not allowed in the upgrade process.
Could someone please shed som light on this issue, and how to solve or "bypass" this. As long as there are records which are applied to another record which is not closed, it is not possible to proceed with the upgrade process.
An example of data provoking the error can be downloaded here:
http://www.mediafire.com/?wmmtxiyjl4d
Thanks in advance.
At least one Job Ledger Entry applied and not closed where Job No. = 898, Phase Code = , Task Code = , Step Code = exists.
This is Text017 in the following code i codeunit 104045 in funcion CheckJobs
WITH JobLedgerEntry DO BEGIN
SETCURRENTKEY("Related to Budget","Job No.","Entry Type","Phase Code","Task Code","Step Code");
JobLedgerEntry2.SETCURRENTKEY("Related to Budget","Job No.","Entry Type","Phase Code","Task Code","Step Code");
SETFILTER("Amt. Posted to G/L",'<>0');
IF FINDSET THEN
REPEAT
SETRANGE("Related to Budget","Related to Budget");
SETRANGE("Job No.","Job No.");
SETRANGE("Entry Type","Entry Type");
SETRANGE("Phase Code","Phase Code");
SETRANGE("Task Code","Task Code");
SETRANGE("Step Code","Step Code");
IF NOT TempJobTaskPhaseStepComb.GET("Job No.","Phase Code","Task Code","Step Code") THEN BEGIN
SETRANGE("Amt. Recognized",0);
IF FINDFIRST THEN BEGIN
UpgradeErrorLog.SetError(
STRSUBSTNO(
Text016,
TABLECAPTION,
FIELDCAPTION("Job No."),"Job No.",
FIELDCAPTION("Phase Code"),"Phase Code",
FIELDCAPTION("Task Code"),"Task Code",
FIELDCAPTION("Step Code"),"Step Code"),
DATABASE::"Job Ledger Entry",'');
TempJobTaskPhaseStepComb."Job No." := "Job No.";
TempJobTaskPhaseStepComb."Phase Code" := "Phase Code";
TempJobTaskPhaseStepComb."Task Code" := "Task Code";
TempJobTaskPhaseStepComb."Step Code" := "Step Code";
TempJobTaskPhaseStepComb.INSERT;
END ELSE BEGIN
JobLedgerEntry2.SETRANGE("Job No.","Job No.");
JobLedgerEntry2.SETRANGE("Phase Code","Phase Code");
JobLedgerEntry2.SETRANGE("Task Code","Task Code");
JobLedgerEntry2.SETRANGE("Step Code","Step Code");
JobLedgerEntry2.SETRANGE("Amt. Recognized",0);
IF JobLedgerEntry2.FINDSET THEN BEGIN
Job.GET("Job No.");
REPEAT
IF ((JobLedgerEntry2."Entry Type" = "Entry Type"::Usage) AND
(((Job."Job Usage Posting" = Job."Job Usage Posting"::Costs) AND
(JobLedgerEntry2."Total Cost" <> 0)) OR
((Job."Job Usage Posting" = Job."Job Usage Posting"::Prices) AND
(JobLedgerEntry2."Total Price" <> 0)))) OR
((JobLedgerEntry2."Entry Type" = "Entry Type"::Sale) AND
JobLedgerEntry2.Chargeable AND
(JobLedgerEntry2."Total Price" <> 0))
THEN BEGIN
UpgradeErrorLog.SetError(
STRSUBSTNO(
Text016,
TABLECAPTION,
FIELDCAPTION("Job No."),"Job No.",
FIELDCAPTION("Phase Code"),"Phase Code",
FIELDCAPTION("Task Code"),"Task Code",
FIELDCAPTION("Step Code"),"Step Code"),
DATABASE::"Job Ledger Entry",'');
TempJobTaskPhaseStepComb."Job No." := "Job No.";
TempJobTaskPhaseStepComb."Phase Code" := "Phase Code";
TempJobTaskPhaseStepComb."Task Code" := "Task Code";
TempJobTaskPhaseStepComb."Step Code" := "Step Code";
TempJobTaskPhaseStepComb.INSERT;
JobLedgerEntry2.FINDLAST;
END;
UNTIL JobLedgerEntry2.NEXT = 0;
END;
END;
END;
SETRANGE("Amt. Recognized");
FINDLAST;
SETRANGE("Related to Budget");
SETRANGE("Job No.");
SETRANGE("Entry Type");
SETRANGE("Phase Code");
SETRANGE("Task Code");
SETRANGE("Step Code");
UNTIL NEXT = 0;
RESET;
SETCURRENTKEY("Related to Budget","Job No.","Entry Type","Phase Code","Task Code","Step Code");
IF FINDSET THEN
REPEAT
SETRANGE("Related to Budget","Related to Budget");
SETRANGE("Job No.","Job No.");
SETRANGE("Phase Code","Phase Code");
SETRANGE("Task Code","Task Code");
SETRANGE("Step Code","Step Code");
SETRANGE(Open,TRUE);
IF FINDSET THEN
REPEAT
JobLedgerEntry2.RESET;
JobLedgerEntry2.SETRANGE("Job No.","Job No.");
JobLedgerEntry2.SETRANGE("Closed by Entry No.","Entry No.");
IF JobLedgerEntry2.FINDFIRST THEN BEGIN
UpgradeErrorLog.SetError(
STRSUBSTNO(
Text017,
TABLECAPTION,
FIELDCAPTION("Job No."),"Job No.",
FIELDCAPTION("Phase Code"),"Phase Code",
FIELDCAPTION("Task Code"),"Task Code",
FIELDCAPTION("Step Code"),"Step Code"), DATABASE::"Job Ledger Entry",'');
FINDLAST;
END;
UNTIL NEXT = 0;
SETRANGE(Open);
FINDLAST;
SETRANGE("Step Code");
SETRANGE("Task Code");
SETRANGE("Phase Code");
SETRANGE("Job No.");
SETRANGE("Related to Budget");
UNTIL NEXT = 0;
END;
The error occurs because an entry of type Usage is closed by an entry of type Sale, and this entry is only partially applied (Remaining Amount > 0) and is therefore Open.
This kind of entry is apparently not allowed in the upgrade process.
Could someone please shed som light on this issue, and how to solve or "bypass" this. As long as there are records which are applied to another record which is not closed, it is not possible to proceed with the upgrade process.
An example of data provoking the error can be downloaded here:
http://www.mediafire.com/?wmmtxiyjl4d
Thanks in advance.
0
Comments
-
I ran into this exact same error on Monday. I put in a support request with Microsoft because I can't find any articles about this. Waiting for their response.0
-
Isnt this issue because, the Job Ledger entry table in older versions have an"Open" field and version 5.0 does not. I just had to create a utility to clear the Open Flag in 4.0 to move on. Navision does not usually like having data in fields which are removed in the new version during upgrades.
Regards
Raj0 -
Hi all,
I'm migrating nav from 3.70--> to 5.00 SP1 and I've encountered the same error.
Have someone an answer for the issue?
klord1379, and the support request?
Tks in advance
Andrea0 -
0
-
Has anyone heard anything about this error?0
-
...0
-
I got to the same error.
Any answer from MS yet?
(I prefer asking here, io. posting a support request. That is like the upgrade process itself: slow.....)0 -
And what about the code below?
If there is a Job with 'normal' JLE's and with one JLE of Type=Usage and not Chargeable, then the upgrade toolkit raises an error!
Seems like MS has to do some work on this...WITH JobLedgerEntry DO BEGIN SETCURRENTKEY("Related to Budget","Job No.","Entry Type","Phase Code","Task Code","Step Code"); JobLedgerEntry2.SETCURRENTKEY("Related to Budget","Job No.","Entry Type","Phase Code","Task Code","Step Code"); SETFILTER("Amt. Posted to G/L",'<>0'); IF FINDSET THEN REPEAT SETRANGE("Related to Budget","Related to Budget"); SETRANGE("Job No.","Job No."); SETRANGE("Entry Type","Entry Type"); SETRANGE("Phase Code","Phase Code"); SETRANGE("Task Code","Task Code"); SETRANGE("Step Code","Step Code"); IF NOT TempJobTaskPhaseStepComb.GET("Job No.","Phase Code","Task Code","Step Code") THEN BEGIN SETRANGE("Amt. Recognized",0); IF FINDFIRST THEN BEGIN UpgradeErrorLog.SetError( STRSUBSTNO( Text016, TABLECAPTION, FIELDCAPTION("Job No."),"Job No.", FIELDCAPTION("Phase Code"),"Phase Code", FIELDCAPTION("Task Code"),"Task Code", FIELDCAPTION("Step Code"),"Step Code"), DATABASE::"Job Ledger Entry",''); TempJobTaskPhaseStepComb."Job No." := "Job No."; TempJobTaskPhaseStepComb."Phase Code" := "Phase Code"; TempJobTaskPhaseStepComb."Task Code" := "Task Code"; TempJobTaskPhaseStepComb."Step Code" := "Step Code"; TempJobTaskPhaseStepComb.INSERT; END ELSE BEGIN JobLedgerEntry2.SETRANGE("Job No.","Job No."); JobLedgerEntry2.SETRANGE("Phase Code","Phase Code"); JobLedgerEntry2.SETRANGE("Task Code","Task Code"); JobLedgerEntry2.SETRANGE("Step Code","Step Code"); JobLedgerEntry2.SETRANGE("Amt. Recognized",0); IF JobLedgerEntry2.FINDSET THEN BEGIN Job.GET("Job No."); REPEAT IF ((JobLedgerEntry2."Entry Type" = "Entry Type"::Usage) AND (((Job."Job Usage Posting" = Job."Job Usage Posting"::Costs) AND (JobLedgerEntry2."Total Cost" <> 0)) OR ((Job."Job Usage Posting" = Job."Job Usage Posting"::Prices) AND (JobLedgerEntry2."Total Price" <> 0)))) OR ((JobLedgerEntry2."Entry Type" = "Entry Type"::Sale) AND JobLedgerEntry2.Chargeable AND (JobLedgerEntry2."Total Price" <> 0)) THEN BEGIN UpgradeErrorLog.SetError( STRSUBSTNO( Text016, TABLECAPTION, FIELDCAPTION("Job No."),"Job No.", FIELDCAPTION("Phase Code"),"Phase Code", FIELDCAPTION("Task Code"),"Task Code", FIELDCAPTION("Step Code"),"Step Code"), DATABASE::"Job Ledger Entry",''); TempJobTaskPhaseStepComb."Job No." := "Job No."; TempJobTaskPhaseStepComb."Phase Code" := "Phase Code"; TempJobTaskPhaseStepComb."Task Code" := "Task Code"; TempJobTaskPhaseStepComb."Step Code" := "Step Code"; TempJobTaskPhaseStepComb.INSERT; JobLedgerEntry2.FINDLAST; END; UNTIL JobLedgerEntry2.NEXT = 0; END; END; END; SETRANGE("Amt. Recognized"); FINDLAST; SETRANGE("Related to Budget"); SETRANGE("Job No."); SETRANGE("Entry Type"); SETRANGE("Phase Code"); SETRANGE("Task Code"); SETRANGE("Step Code"); UNTIL NEXT = 0;
0 -
Partially applied Job Ledger Entries is one of the issues related to the Upgrade Toolkit that is fixed in 2009 SP1. This is the part in the updated manual that covers the new logic for applied ledger entries:
Codeunit 104045 performs the following tasks:
• Sets Open to No for all job ledger entries where Quantity of the applied job ledger entries totals 0 even if Remaining Amount is not 0. This should only be the case when sales discounts have been applied or for Type G/L accounts where quantity is not used accurately. Also see Upgrading Jobs codeunit 104048.
Codeunit 104048 performs the following tasks:
• Job planning lines, in table 1003, with Line Type Contract are created based on job ledger entries if:
Type is Sales: a job planning line will be created with Invoiced set to True; based on the Invoice Type it will be created as an invoice or a credit memo.
Type is Usage: Chargeable is True and Quantity of the applied job ledger entries is larger than 0; a job planning line will be created based on remaining quantity and the Unit Price.
And we have enhanced the performance drastically when upgrading Jobs.0 -
I'll have look at it soon.
Up to now I can not advise customers that use Job functionality to upgrade to 5.0 or 2009.
Too many bugs and conceptual mistakes.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions