Navision 2013 upgrading error (Step 2)

pablo1981
Member Posts: 6
Hello everyone
I have the attached error migrating from Navision Navision 2009 R2 to 2013.
I'm throwing the page 104002, step 2
The customer has shared several tables in his database, including the table 169 (Job Ledger Entry).
The problem occurs on the codeunit 104048 within UpdateLedgerEntryDim function. The SQL is made up with the company name + '$' + table. But being shared this error process.
Would someone happened to this problem?,
Do you occasionally happen any possible solution?
Thank you very much for the help!
I have the attached error migrating from Navision Navision 2009 R2 to 2013.
I'm throwing the page 104002, step 2
The customer has shared several tables in his database, including the table 169 (Job Ledger Entry).
The problem occurs on the codeunit 104048 within UpdateLedgerEntryDim function. The SQL is made up with the company name + '$' + table. But being shared this error process.
Would someone happened to this problem?,
Do you occasionally happen any possible solution?
Thank you very much for the help!
0
Answers
-
You will need to manually create the Dimension Set Id for each ledger entry and then remove all entries belonging to the job ledger entry from the ledger entry dimension table.
Here is an example you could try do build your code on.UpdateLedgerEntryDim(VAR StateIndicator : Record "State Indicator") WITH JobLedgerEntry DO IF StateIndicator.UpdateTable(TABLENAME) THEN BEGIN TimeLog.TimeLogInsert(TimeLog,TABLENAME,TRUE); IF FINDSET(TRUE) THEN REPEAT LedgerEntryDim.SETRANGE("Table ID",DATABASE::"Job Ledger Entry"); LedgerEntryDim.SETRANGE("Entry No.","Entry No."); "Dimension Set ID" := GetLedgerEntryDimSetID(LedgerEntryDim); MODIFY; UNTIL NEXT = 0; LedgerEntryDim.SETRANGE("Table ID",DATABASE::"Job Ledger Entry"); LedgerEntryDim.DELETEALL; LedgerEntryDim.RESET; TimeLog.TimeLogInsert(TimeLog,TABLENAME,FALSE); StateIndicator.EndUpdateTable(TABLENAME); END; WITH LedgerEntryDim DO IF StateIndicator.UpdateTable(TABLENAME) THEN BEGIN TimeLog.TimeLogInsert(TimeLog,TABLENAME,TRUE); UpgradeDimEntry.UpgradeTable( DATABASE::"Ledger Entry Dimension", 0); TimeLog.TimeLogInsert(TimeLog,TABLENAME,FALSE); StateIndicator.EndUpdateTable(TABLENAME); END; GetLedgerEntryDimSetID(VAR LedgerEntryDim : Record "Ledger Entry Dimension") DimSetID : Integer WITH LedgerEntryDim DO IF FINDSET THEN BEGIN REPEAT TempDimSetEntry.INIT; TempDimSetEntry."Dimension Code" := "Dimension Code"; TempDimSetEntry."Dimension Value Code" := "Dimension Value Code"; TempDimSetEntry.INSERT(TRUE); UNTIL NEXT = 0; DimSetID := DimMgt.GetDimensionSetID(TempDimSetEntry); END;
________________________________
Gunnar Gestsson
Microsoft Certified IT Professional
Dynamics NAV MVP
http://www.dynamics.is
http://Objects4NAV.com0 -
Thank you Gunnar
I will try it0 -
thegunzo wrote:You will need to manually create the Dimension Set Id for each ledger entry and then remove all entries belonging to the job ledger entry from the ledger entry dimension table.
Here is an example you could try do build your code on.UpdateLedgerEntryDim(VAR StateIndicator : Record "State Indicator") WITH JobLedgerEntry DO IF StateIndicator.UpdateTable(TABLENAME) THEN BEGIN TimeLog.TimeLogInsert(TimeLog,TABLENAME,TRUE); IF FINDSET(TRUE) THEN REPEAT LedgerEntryDim.SETRANGE("Table ID",DATABASE::"Job Ledger Entry"); LedgerEntryDim.SETRANGE("Entry No.","Entry No."); "Dimension Set ID" := GetLedgerEntryDimSetID(LedgerEntryDim); MODIFY; UNTIL NEXT = 0; LedgerEntryDim.SETRANGE("Table ID",DATABASE::"Job Ledger Entry"); LedgerEntryDim.DELETEALL; LedgerEntryDim.RESET; TimeLog.TimeLogInsert(TimeLog,TABLENAME,FALSE); StateIndicator.EndUpdateTable(TABLENAME); END; WITH LedgerEntryDim DO IF StateIndicator.UpdateTable(TABLENAME) THEN BEGIN TimeLog.TimeLogInsert(TimeLog,TABLENAME,TRUE); UpgradeDimEntry.UpgradeTable( DATABASE::"Ledger Entry Dimension", 0); TimeLog.TimeLogInsert(TimeLog,TABLENAME,FALSE); StateIndicator.EndUpdateTable(TABLENAME); END; GetLedgerEntryDimSetID(VAR LedgerEntryDim : Record "Ledger Entry Dimension") DimSetID : Integer WITH LedgerEntryDim DO IF FINDSET THEN BEGIN REPEAT TempDimSetEntry.INIT; TempDimSetEntry."Dimension Code" := "Dimension Code"; TempDimSetEntry."Dimension Value Code" := "Dimension Value Code"; TempDimSetEntry.INSERT(TRUE); UNTIL NEXT = 0; DimSetID := DimMgt.GetDimensionSetID(TempDimSetEntry); END;
I tried your solution, Gunnar.
It works fine!
Thank you very much again0
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