Question about Item Dimension
silverferret
Member Posts: 7
One of our datapeople just loaded a whole bunch of items through a dataport. He populated the Global Dimension 1 Code with a value that I do see in the Dimension Value table (viewing through SQL) but when we look at the items through the NAV form the Dimension appears to not have been set. If we go in and manually set it through the form, it stays. I go back into the Item record (again, viewing through SQL) and I see NO difference to the record. Same code is in Global Dimension 1 Code.
I am assuming that there is a table somewhere that I am missing, but I haven't been able to find it.
Did search the forum before posting, but while I found a lot of questions about Dimensions, I didn't find anything about "where" this info is stored.
Any help would be appreciated... I have many years of programming experience, but this is the first time I have seen NAV.
Thanks.
I am assuming that there is a table somewhere that I am missing, but I haven't been able to find it.
Did search the forum before posting, but while I found a lot of questions about Dimensions, I didn't find anything about "where" this info is stored.
Any help would be appreciated... I have many years of programming experience, but this is the first time I have seen NAV.
Thanks.
0
Answers
-
-
Kine, that is what I was looking for, thank you.
So I am assuming that the correct way to do this then would have been to have some C/AL code in the dataport that created the entry in the Default Dimension table as well as inserting the Item.
I will do a search of the forum to look for some code, but please feel free to "steer" me if that is not the correct direction.
Thanks again for the help.0 -
very rough but something like this perhaps
Onafterimport()
DefaultDim."Table ID" := '27';
DefaultDim."No." := Item."No.";
DefaultDim."Dimension Code" := //"Item" or whatever you call yours;
DefaultDim."Dimension Value Code" := Item."Global Dimension 1";
DefaultDim.INSERT(TRUE);
personally I would go for importing into variables and assigning them later. Probably you should slap a validate on the code above too.
so i would make lines like
DefaultDim."Dimension Value Code" := varGlobalDim1;
that's here nor there0 -
Fantastic! I will play around with the example and dev and see if I can get it working.
Thanks a lot guys!0 -
I'm pretty sure that the system will create the Default Dimension for you when you validate the Global Dimension 1 and 2, but I'd have to check the code.0
-
DenSter wrote:I'm pretty sure that the system will create the Default Dimension for you when you validate the Global Dimension 1 and 2, but I'd have to check the code.
I would think so..I've never had to force a GD1 or 2 ever..
Must be missing a validate somewhere in the dataport.0 -
To have correctly filled default dim, you need correctly create the record in Item table. You need to insert the empty record first and after that validate the fields and do Modify in this way:
Item.INIT; Item."No." := ''; //or your imported value Item.INSERT(True); Item.VALIDATE(xxxx); ... //Filling the values Item.MODIFY(True);
If you are filling the fields before you call insert, NAV will not fill the Default dim table, because in this situation the PK of the record is not known... (e.g. because it is filled in OnInsert when No. series is used)0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 250 Dynamics CRM
- 102 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

