Create Dimension set id for the combination of three 'Dimension code': Dept,Project and Channel.

ManiNav
Member Posts: 120
Hi Everyone,(Nav-2018)
I would like to create 'Dimension set id' for the combination of three 'Dimension code': Dept,Project and Channel in "Dimension set entry" table. for this i am following the below link:
https://dynamicsuser.net/nav/b/amol/posts/dimension-update-in-nav-2016
For this: Step:1. I have created one variable for record "Dimension set entry" with property temporary=yes,as they told.
Step:2. I am not able to get that how can i add all above three dimension code combination:Dept,Project and Channel by cal/code. and further to call GetDimensionId of codeunit:DimensionManagement.
Please guide me.
Thanks,
Mani.
I would like to create 'Dimension set id' for the combination of three 'Dimension code': Dept,Project and Channel in "Dimension set entry" table. for this i am following the below link:
https://dynamicsuser.net/nav/b/amol/posts/dimension-update-in-nav-2016
For this: Step:1. I have created one variable for record "Dimension set entry" with property temporary=yes,as they told.
Step:2. I am not able to get that how can i add all above three dimension code combination:Dept,Project and Channel by cal/code. and further to call GetDimensionId of codeunit:DimensionManagement.
Please guide me.
Thanks,
Mani.
0
Answers
-
Hi everyone,
Please guide me for the above query.
Thanks,
Mani.0 -
You should create a temporary dimension set entry something like this:
DimSetEntry.INIT;
DimSetEntry."Dimension Set ID":=-1;
DimSetEntry."Dimension Code":=lt_DimSetEntry."Dimension Code";
DimSetEntry."Dimension Value Code":=lt_DimSetEntry."Dimension Value Code";
DimSetEntry."Dimension Value ID":=lt_DimSetEntry."Dimension Value ID";
DimSetEntry."Dimension Name":=lt_DimSetEntry."Dimension Name";
DimSetEntry."Dimension Value Name":=lt_DimSetEntry."Dimension Value Name";
DimSetEntry.INSERT(FALSE);
Using this function, you will get the id
GetDimensionSetID(recDimSetEntry)0 -
Hi KTA8,
Thank you so much for your reply.
Here I am not able to get, where you add my required three 'Dimension code': Dept,Project and Channel. and for which record you are using lt_DimSetEntry.
Please tell me. your will be appreciable.
Thanks,
Mani.0 -
Each of your dimensions is inserted as a Record of Dimension Set Entry, using the following block from KTA8:
DimSetEntry.INIT; DimSetEntry."Dimension Set ID":=-1; DimSetEntry."Dimension Code":=lt_DimSetEntry."Dimension Code"; //This is your three codes: project, dept & channel DimSetEntry."Dimension Value Code":=lt_DimSetEntry."Dimension Value Code"; //This is the value from your dimension codes DimSetEntry."Dimension Value ID":=lt_DimSetEntry."Dimension Value ID"; DimSetEntry."Dimension Name":=lt_DimSetEntry."Dimension Name"; DimSetEntry."Dimension Value Name":=lt_DimSetEntry."Dimension Value Name"; DimSetEntry.INSERT(FALSE);
Then, once you've inserted all 3, you pass it as a parameter to the GetDimensionSetID Function, which is in the Dimension Set Entry table.
0 -
Hi KTA8/Phogue,
below code is not working as i need.
DimSetEntry.INIT;
DimSetEntry."Dimension Set ID":=-1;
DimSetEntry."Dimension Code":=lt_DimSetEntry."Dimension Code"; //This is your three codes: project, dept & channel
DimSetEntry."Dimension Value Code":=lt_DimSetEntry."Dimension Value Code"; //This is the value from your dimension codes
DimSetEntry."Dimension Value ID":=lt_DimSetEntry."Dimension Value ID";
DimSetEntry."Dimension Name":=lt_DimSetEntry."Dimension Name";
DimSetEntry."Dimension Value Name":=lt_DimSetEntry."Dimension Value Name";
DimSetEntry.INSERT(FALSE);
I am not able to get your whole code:
1.DimSetEntry."Dimension Set ID":=-1;
---> why you assign to -1,what it will do?
2.DimSetEntry."Dimension Code":=lt_DimSetEntry."Dimension Code"; //This is your three codes: project, dept & channel
---> here, for which record you are using 'lt_DimSetEntry', is it variable for 'Dimension set entry'? I am using 'DimSetEntry' with property-Temporary = Yes.
so, please tell me in details, because i am not getting how it will generate Dimension set id for my given three Dimension code combination: Dept, channel and project.
Plese guide me,
Thanks,
Mani.0 -
Hi KTA8/Phogue,
Actually i am creating purchase invoice to take the value from one table, where i have three dimension code combination, but for this i need to update one dimension set id for all dimension code. For this I need to create dimension set id.
Please help me further.
Thanks,
Mani.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