Add a dimension programmatically
                
                    Per1008                
                
                    Member Posts: 10                
            
                        
            
                    How do I add one or more dimension (480 - Dimension Entry Set) to a Gen. Journal Line programmatically?
It must be one line of code to be called ...
I can't find that one line of code - therefore I have tried:
DimensionSetEntryRec_L.VALIDATE("Dimension Code",<Code>);
DimensionSetEntryRec_L.VALIDATE("Dimension Value Code",<Value>);
DimensionSetEntryRec_L.INSERT(TRUE);
DimensionSetEntryRec_L.GetDimensionSetID(DimensionSetEntryRec_L);
DimSetID_L := DimensionManagementCU_L.GetDimensionSetID(DimensionSetEntryRec_L);
GenJournalLineRec_L."Dimension Set ID" := DimSetID_L;
GenJournalLineRec_L.MODIFY(TRUE);
It seems to Work for the first line I create, but not the NeXT one and the rest of the lines
                It must be one line of code to be called ...
I can't find that one line of code - therefore I have tried:
DimensionSetEntryRec_L.VALIDATE("Dimension Code",<Code>);
DimensionSetEntryRec_L.VALIDATE("Dimension Value Code",<Value>);
DimensionSetEntryRec_L.INSERT(TRUE);
DimensionSetEntryRec_L.GetDimensionSetID(DimensionSetEntryRec_L);
DimSetID_L := DimensionManagementCU_L.GetDimensionSetID(DimensionSetEntryRec_L);
GenJournalLineRec_L."Dimension Set ID" := DimSetID_L;
GenJournalLineRec_L.MODIFY(TRUE);
It seems to Work for the first line I create, but not the NeXT one and the rest of the lines
0                
            Comments
- 
            Put your values into a temp table of type 480: TempDimSetEntry
 Then call:
 NewDimID := DimMgt.GetDimensionSetID(TempDimSetEntry);
 The DimMgt.GetDimensionSetID will automatically add missing entries.Bardur Knudsen
 Microsoft - Dynamics NAV0
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
- 323 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
