Moving Journal Line Dimension to Ledger Entry Dimension without deleting it

Hello,

I need to do a recurring post of something I have stored in a new table (accruals). I am using table 356 Journal Line Dimension to store my 3-8 shortcut dimensions as done in the standard functionality.

I have been studying the standard functionality, and the function MoveJnlLineDim in the DimensionManagement codeunit is used when posting from a General Journal but allso when posting from an recurring journal, to move the dimension lines.

When I use this function, the lines are deleted from the Journal Line Dimension table. How can I prevent this? How is it avoided when using the recurring journal?

Thanks in advance!

/Petan

The responsible code for deleting/not deleting Journal Line dimensions can be found in CU13 where you find

IF GenJnlTemplate.Recurring THEN BEGIN
// Recurring journal
...
END ELSE BEGIN
// Not a recurring journal
...
END;

In the “ELSE” you will find the code which deletes the Journal Lines and dimensions.

Thanks, Thomas. I see it.

I find it strange, because something is deleting my Journal Line Dimensions though I am calling CU 12 “Gen. Jnl.-Post Line” directly…

IN this special case you should not call CU12.RUN(GenJnlLine) but call a function inside the CU12 :

RunWithCheck(GenJnlLine, TempJnlLineDim) or RunWithoutCheck(GenJnlLine, TempJnlLineDim)

Copy the JnlLineDimensions to a Temporary JnlLineDim prior to calling the function.

Thanks again, that´s of great help! [:)]

So just mark the answer you think is good as an answer to your problem, so all others also know that the quuestion is answered.