There are two short dimension codes 4 OVEN and 5 OPERATIVE which are assigned to an item journal line. The codes are validated as such where Rec is "Item Journal Line"
Rec.ValidateShortcutDimCode(5, ShortcutDimCode[5]);
Rec.ValidateShortcutDimCode(4, ShortcutDimCode[4]);
The values returned into the dimension code array are perfectly valid as I can see in the debugger, however only the OPERATIVE (dimension code 5) is actually written to the Ledger Entry Dimension table when posting the journal line. The OVEN code is ignored :-k
Is there something that tells Navision to write the value of a dimension code to the Ledger Entry Dimension table or could I be looking in the wrong place for the other dimension code? ](*,) ](*,) ](*,)
Cheers
Life is for enjoying ... if you find yourself frowning you're doing something wrong
0
Comments
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
[/code]
Make sure you change your sequence of code based on above sample and make sure shortcutdimcode is populated.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I get an error 'There is nothing to post', I have reapplied various lines to get the output quantity (did I mention I'm trying to perform an Output Journal :-k ), then the production order number, operation number and item number (I seem to be back at square one with the code) but still no dimension 4 (OVENS) appearing in the Ledger Entry Dimension - is this the correct table to be looking in.
I am using CU 22 to post the journal line.
I have tried to do a standard output journal and that is NOT storing the OVENS dimension code. Which leads me to believe something is not set up correctly with this dimension. Any ideas where I can check?
[/b]
CU22.runwithcheck(ItemJournal,JournalDim);
JournalDim would be your dimension,
Also you do not need to insert the Item Journal.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Would I call CU22.runwithcheck(ItemJournal,JournalDim); instead of the code above
Also you do not need to insert or modify the Item Journal you are creating. So comment those out. Create a temporary JournalDim record variable and populate it with dimensions and pass it to runwithcheck
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
This has had a little extra work done because I was getting invalid production routing line but it is essentially the same as the sample code you provided. Instead of one problem I now have 2 problems
The OPERATIVES dimension 5 now posts a blank value
The OVENS dimension 4 still does not post at all - no value, no code, no entry in the Ledger Entry Dimension table, nothing.
](*,) ](*,)
]
JournalDimension."Dimension Value Code" := ShortcutDimCode[4];
instead of
JournalDimension."New Dimension Value Code" := ShortcutDimCode[4];
Regards
ar4ijs - The ShortcutDimCode[4] and ShortcutDimCode[5] are global variables assigned on a card
JedrzejT - no change
I'm still confused why the dimension code 4 will not post through the standard Output Journal card 99000823. Can anyone shed some light on why this would not happen?
Do all dimensions post to the Ledger Entry Dimension table? :-k
1. Remove 2. Put ItemJnlLine.INSERT(TRUE); before inserting dims.
3. Use JournalDimension."Dimension Value Code" instead of JournalDimension."New Dimension Value Code", and try to insert it with TRUE.
The OPERATIVES dimension 5 populates but the OVENS dimension does not appear in the Ledger Entry Dimension table. I think this is either a bug or a setup issue as previously in this post I mentioned this does not work from the default card.
Any ideas where I can check if it is a setup issue?
I am using UK Dynamics NAV 5 if thats any help.[/b]