Codeunit which updates global dimensions in the table G/L Entry.

Maddynav123
Member Posts: 12
Hi all,
I am new in NAVISION and I need your help. I need to update Global Dimensions(those who are empty) in table G/L Entry.
Please can you help me on this?
I will appreciate your help.
Thanks,
Maddy.
I am new in NAVISION and I need your help. I need to update Global Dimensions(those who are empty) in table G/L Entry.
Please can you help me on this?
I will appreciate your help.
Thanks,
Maddy.
0
Best Answer
-
It depends on NAV version. There are some differences between NAV 2016 and older.
In the NAV 2013 and older, you could just update the dimension field. In the new versions, you have to update the dimension field and the dimension set ID field. The best way is to look at Codeunit 408 (DimensionManagement) - on the function ValidateShortcutDimValues. This function has two parameters that provide the right values. The first one allows you to define the dimension value and the second one provides the dimension set ID (it is calculated from the dimension combination).
So you have to create a new codeunit which will fill the empty dimension fieldsTomáš Kapitán5
Answers
-
It depends on NAV version. There are some differences between NAV 2016 and older.
In the NAV 2013 and older, you could just update the dimension field. In the new versions, you have to update the dimension field and the dimension set ID field. The best way is to look at Codeunit 408 (DimensionManagement) - on the function ValidateShortcutDimValues. This function has two parameters that provide the right values. The first one allows you to define the dimension value and the second one provides the dimension set ID (it is calculated from the dimension combination).
So you have to create a new codeunit which will fill the empty dimension fieldsTomáš Kapitán5 -
Hi Kepty,
Thank you for answering me. It was helpful.
I create a new codeunit and a function where I did the following:
- Check in the table Dimension Set Entry, by Dimension Set Id field if there are dimension for the entries, If we find we enter in table G/L Entry
- If we don't find dimensions in Dimension Set Entry table we search in headers(table Sales Invoice Header,Sales Cr.Memo Header,Purch. Inv. Header,Purch. Cr. Memo Hdr.) If we find dimension value that in headers that qe didn't find in Dimension Set Entry table we add in G/L entry table and also e should add this dimension value that we found in Dimension Set ENtry table, we should also update the Dimension Set Entry table using CodeUnit 408 using functions GetDimensionSet and GetDimensionSetID.
Thank you
Maddy.
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