Value Posting field in Default Dimension table

silverferret
Member Posts: 7
I am importing Items via a dataport. After some help from a previous post, the VALIDATE is creating the correct entry in the DefaultDimension table, however, the "Value Posting" field is not populated.
I see that VALIDATE is creating the DefaultDimension record, but then would I need to select it and MODIFY?
Here is the code I am currently using. Thanks in advance for any help.
I see that VALIDATE is creating the DefaultDimension record, but then would I need to select it and MODIFY?
Here is the code I am currently using. Thanks in advance for any help.
ITEM - OnAfterImportRecord() Item.INIT; Item."No." := varNo; Item.INSERT; "Item Unit of Measure".INIT; "Item Unit of Measure"."Item No." := varNo; "Item Unit of Measure".Code := varUnit; "Item Unit of Measure".INSERT; Item.VALIDATE ("Global Dimension 1 Code", varGlobalDim1Code); Item.VALIDATE ("Base Unit of Measure", varUnit); Item.MODIFY;
0
Comments
-
You don't need to do it, because the function "ValidateShortcutDimCode" called in the OnValidate-trigger of field "Global Dimension 1 Code" there is a MODIFY of the Item-record.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
I am a total newbie to NAV, so apologies if I am asking redundant questions.You don't need to do it, because the function ...
I must have to do something because right now the Value Posting field is not getting populated. According to the data team here, they would like to see a value of 2 in there.
So I would think that either I need to code for this, OR I need to have something setup somewhere that the validation can draw from in order to determine what value really goes in that field. Right?0 -
In Codeunit 408:"DimensionManagement", in function "SaveDefaultDim" change the code as follows:
This code will give the value "Same Code" for the dimension 1 used in the Item table.END ELSE BEGIN DefaultDim.INIT; DefaultDim.VALIDATE("Table ID",TableID); DefaultDim.VALIDATE("No.",No); DefaultDim.VALIDATE("Dimension Code",GLSetupShortcutDimCode[FieldNumber]); DefaultDim.VALIDATE("Dimension Value Code",ShortcutDimCode); //> EXTRA CODE BEGIN IF TableID = DATABASE::Item THEN IF fieldNumber = 1 THEN DefaultDim."Value Posting" := DefaultDim."Value Posting"::"Same Code"; //< EXTRA CODE END DefaultDim.INSERT; RecRef.GETTABLE(DefaultDim); ChangeLogMgt.LogInsertion(RecRef); END;
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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