Import Beginning Balances with Dimensions

aadams
Member Posts: 19
Hello,
My company is in the process of implementing NAV 2013 and I'm tasked with importing our opening balances. I had done this before in NAV 2009, but apparently the Dimensions are drastically different now and I'm running into a few glitches.
I'm developing an XMLPort that imports a text file containing the basic G/L Acct, debit, credit and a couple dimension values. My understanding of the new dimension set entry is limited, but I was under the impression that I would need to:
1. Insert the Journal line
2. Make sure the Dimension code/value exists (insert if not)
3. Insert a dimension set entry record with the Dim set id from the Journal Line table for each dimension
Here's a sample of how I'm currently attempting this:
Insert Journal line:
When I run this I get an error that I don't have "insert" permissions on the Dimension Set Entry table.
I must be doing it wrong, but I cannot find any resources that help point me in the right direction. Any help would be appreciated.
My company is in the process of implementing NAV 2013 and I'm tasked with importing our opening balances. I had done this before in NAV 2009, but apparently the Dimensions are drastically different now and I'm running into a few glitches.
I'm developing an XMLPort that imports a text file containing the basic G/L Acct, debit, credit and a couple dimension values. My understanding of the new dimension set entry is limited, but I was under the impression that I would need to:
1. Insert the Journal line
2. Make sure the Dimension code/value exists (insert if not)
3. Insert a dimension set entry record with the Dim set id from the Journal Line table for each dimension
Here's a sample of how I'm currently attempting this:
Insert Journal line:
GenJournLine.TRANSFERFIELDS("Gen. Journal Line"); GenJournLine."Line No." := LineNo; GenJournLine."Journal Template Name" := TemplateName; GenJournLine."Journal Batch Name" := BatchName; GenJournLine.VALIDATE("Account Type","Gen. Journal Line"."Account Type"::"G/L Account"); GenJournLine.INSERT(TRUE);If dimension value does not exist, create it (this is done for each dimension I want to attach to the journal line).
IF NOT DimValue.GET('CUSTS',CustDim) THEN BEGIN DimValue.INIT; DimValue.VALIDATE("Dimension Code",'CUSTS'); DimValue.VALIDATE(Code,CustDim); DimValue.INSERT(TRUE); END;Now insert the dimension set entry
JnlLineDimension.VALIDATE("Dimension Code",'CUSTS'); JnlLineDimension.VALIDATE("Dimension Value Code",CustDim); JnlLineDimension.VALIDATE("Dimension Value ID",DimValue."Dimension Value ID"); JnlLineDimension."Dimension Set ID" := GenJournLine."Dimension Set ID"; JnlLineDimension.INSERT(TRUE);
When I run this I get an error that I don't have "insert" permissions on the Dimension Set Entry table.
I must be doing it wrong, but I cannot find any resources that help point me in the right direction. Any help would be appreciated.
0
Comments
-
May I know why are you not using Rapid Start Services of NAV2013?
Please have a look at this video.
http://mohana-dynamicsnav.blogspot.in/2013/04/how-to-import-and-post-opening-balances.html0 -
If you cannot use RapidStart, then do it along these lines:
// declare TempDimensionSetEntry as a temp record 480
// repeat this for each value
TempDimensionSetEntry.init;
TempDimensionSetEntry.validate("Dimension Code",< some dimension code>);
TempDimensionSetEntry.validate("Dimension Value Code",<some new value>);
TempDimensionSetEntry.insert(true);
// and then use codeunit 408 to retrieve the dimension set id:
JournlLine."Dimension Value ID" := DimMgt.GetDimensionSetID(TempDimensionSetEntry);
DimMgt will automatically create a new dimension set id if it didn't exist already.Bardur Knudsen
Microsoft - Dynamics NAV0 -
Both answers should be in tips.. thx0
-
Thanks for the replies, and sorry for the late response.
I ended up just stuffing the dimensions into shortcut dimensions, which worked. I wasn't able to use the RapidStart because we are making various changes (COA changes) and needed to incrementally import/test the data. Our NAV reseller advised that RapidStart wouldn't be able to handle that without customization.
@mohana_cse06, I had actually watched that video before I posted the question. I was not able to get that working either. I didn't have the same packages as the guy in the video, and was encountering errors when I tried to set them up (can't recall the exact details, but I'm sure I was doing it wrong).
@BardurKnudsen, There was another post somewhere using that method, which I had attempted without success (same permission error at the TempDimensionSetEntry.insert(true) part). I will definitely try this again next time.0 -
The packages are the standard Packages released with NAV2013 Base Database.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