Adding a 9th Dimension Value during Gen Journal Import from Excel (NAV 2016)

Village_Idiot
Member Posts: 17
I developed a journal import from excel (using a report and excel buffer) to import Journal entries from Excel Sheets for my client.
They already have 8 dimensions in Shortcut Dimensions 1 through 8, but they use 10 dimensions. During Import, sometimes the user will require the import to populate the 9th Dimension's values. Due to the Dimension Management code unit only able to handle the 8 shortcut dimensions, I am a little lost as to how to add the extra dimension and value to the dimension set while importing.
Any ideas would be welcome
Code extract : Check for Column 25 near end of code extract
They already have 8 dimensions in Shortcut Dimensions 1 through 8, but they use 10 dimensions. During Import, sometimes the user will require the import to populate the 9th Dimension's values. Due to the Dimension Management code unit only able to handle the 8 shortcut dimensions, I am a little lost as to how to add the extra dimension and value to the dimension set while importing.
Any ideas would be welcome
Code extract : Check for Column 25 near end of code extract
REPEAT CASE ExcelBuf."Column No." OF 1: BEGIN IF ISSERVICETIER THEN BEGIN EVALUATE(DateTime,ExcelBuf."Cell Value as Text"); grecGenJnlLine."Posting Date" := DT2DATE(DateTime); END ELSE EVALUATE(grecGenJnlLine."Posting Date",ExcelBuf."Cell Value as Text"); END; 2: IF NOT "Use Document No. Series" THEN EVALUATE(grecGenJnlLine."Document No.",ExcelBuf."Cell Value as Text") ELSE AssignDocNo; 3: BEGIN EVALUATE(grecGenJnlLine."Account Type",ExcelBuf."Cell Value as Text"); grecGenJnlLine.VALIDATE("Account Type"); END; 4: BEGIN EVALUATE(grecGenJnlLine."Account No.",ExcelBuf."Cell Value as Text"); grecGenJnlLine."Account No." := DELCHR(grecGenJnlLine."Account No.",'=',','); grecGenJnlLine.VALIDATE("Account No."); END; 5: BEGIN EVALUATE(grecGenJnlLine."Shortcut Dimension 1 Code",ExcelBuf."Cell Value as Text");//DIM1 grecGenJnlLine.VALIDATE("Shortcut Dimension 1 Code"); END; 6:BEGIN EVALUATE(grecGenJnlLine."Shortcut Dimension 2 Code",ExcelBuf."Cell Value as Text");//DIM2 grecGenJnlLine.VALIDATE("Shortcut Dimension 2 Code"); END; 7:BEGIN // DIM3 EVALUATE(lcodDimValue[3],ExcelBuf."Cell Value as Text"); grecGenJnlLine.ValidateShortcutDimCode(3,lcodDimValue[3]); END; 8:BEGIN // DIM4 EVALUATE(lcodDimValue[4],ExcelBuf."Cell Value as Text"); grecGenJnlLine.ValidateShortcutDimCode(4,lcodDimValue[4]); END; 9:BEGIN // DIM5 EVALUATE(lcodDimValue[5],ExcelBuf."Cell Value as Text"); grecGenJnlLine.ValidateShortcutDimCode(5,lcodDimValue[5]); END; 10:BEGIN// DIM6 EVALUATE(lcodDimValue[6],ExcelBuf."Cell Value as Text"); grecGenJnlLine.ValidateShortcutDimCode(6,lcodDimValue[6]); END; 11:BEGIN // DIM7 EVALUATE(lcodDimValue[7],ExcelBuf."Cell Value as Text"); grecGenJnlLine.ValidateShortcutDimCode(7,lcodDimValue[7]); END; 12:BEGIN //DIM8 EVALUATE(lcodDimValue[8],ExcelBuf."Cell Value as Text"); grecGenJnlLine.ValidateShortcutDimCode(8,lcodDimValue[8]); END; // 13: // 14: 15:EVALUATE(grecGenJnlLine."External Document No.",ExcelBuf."Cell Value as Text");//external document no 16:EVALUATE(grecGenJnlLine.Description,ExcelBuf."Cell Value as Text");//Description 17:EVALUATE(grecGenJnlLine.Description,ExcelBuf."Cell Value as Text");//Description 18: BEGIN EVALUATE(grecGenJnlLine.Amount,ExcelBuf."Cell Value as Text"); grecGenJnlLine.VALIDATE(Amount); END; 19: BEGIN EVALUATE(grecGenJnlLine."Bal. Account Type",ExcelBuf."Cell Value as Text"); grecGenJnlLine.VALIDATE("Bal. Account Type"); END; 20: BEGIN EVALUATE(grecGenJnlLine."Bal. Account No.",ExcelBuf."Cell Value as Text"); grecGenJnlLine."Bal. Account No." := DELCHR(grecGenJnlLine."Bal. Account No.",'=',','); grecGenJnlLine.VALIDATE("Bal. Account No."); END; 21://Currency Code BEGIN EVALUATE(grecGenJnlLine."Currency Code",ExcelBuf."Cell Value as Text"); grecGenJnlLine.VALIDATE("Currency Code"); END; 23://ALLOCATION BEGIN EVALUATE(grecGenJnlLine."Allocation Code",ExcelBuf."Cell Value as Text"); grecGenJnlLine.VALIDATE("Allocation Code"); END; // 25://DIM9 // BEGIN // EVALUATE(lcodDimValue[9],ExcelBuf."Cell Value as Text"); // grecGenJnlLine.ValidateShortcutDimCode(9,lcodDimValue[9]); // END; END; UNTIL ExcelBuf.NEXT = 0;
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