I have to be missing something

I’m doing some mods to Attain 3.10B and part of the modification is posting a trx. that doesn’t normally get a dimension value with a global dimension. I’ve updated the Gen. Journal Line record with the global dimension that I want. During the process the OnRun of C11 the following code gets run and the following lines get executed:

IF "Shortcut Dimension 1 Code" <> '' THEN BEGIN
  TempJnlLineDim."Table ID" := DATABASE::"Gen. Journal Line";
  TempJnlLineDim."Journal Template Name" := "Journal Template Name";
  TempJnlLineDim."Journal Batch Name" := "Journal Batch Name";
  TempJnlLineDim."Journal Line No." := "Line No.";
  TempJnlLineDim."Dimension Code" := GLSetup."Global Dimension 1 Code";
  TempJnlLineDim."Dimension Value Code" := "Shortcut Dimension 1 Code";

At this point I have a record in TempJnlLineDim. No problems so far. Then TempJnlLineDim is passed by VAR to the RunCheck function (and is named to JnlLineDim). I put this line of code in RunCheck as the very first line that gets executed:

IF (JnlLineDim."Table ID" <> 0) AND (JnlLineDim.COUNT = 0) THEN ERROR('in codeunit 11 TableID = %1', JnlLineDim."Table ID"); 

Any whaddia know? My error message appears! The resulting message is: in codeunit 11 TableID = 81; It’s almost like .INSERT wasn’t called… Something is happening to that temp record variable when it is being passed to the RunCheck function. But this is codeunit #11. The final posting point! Therefore I must be missing something otherwise this would have come up before. [xx(] Django

Hi, Insert line TempJnlLineDim.INIT; just before TempJnlLineDim.“Table ID” := DATABASE::“Gen. Journal Line”; and try it…

This ended up being a bug in 3.10 that was fixed in 3.60. Codeunit 12 was deleting the TempJnlLineDim variable before passing it back to Codeunit 11. The code I was running was using this old calling convention due to legacy support for global dimensions. Newer code didn’t run the sections I was so few people had encountered this issue. Django