web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

How to create a General Journal Line record with dimensions?

(0) ShareShare
ReportReport
Posted on by 555

Hi experts,

I use NAV 2016 and create some records in the General Journal Line table.

I need to add values in "Shortcut Dimension 3 Code" and "Shortcut Dimension 4 Code", but I don't know how to do that.

Can someone please show me a few lines of code with this? I think, I should use DimMgt.GetDefaultDim() somehow and add the two values, I want. How do I do that?

I have the same question (1)
  • Verified answer
    Suresh Kulla Profile Picture
    50,241 Super User 2025 Season 2 on at
    RE: How to create a General Journal Line record with dimensions?

    You need to create a temp dimension set entry with those dimension code and values and then retrieve the dimension set id and assign to the Gen. Jnl Line

    Something like below

              DimValue.GET("Dimension Code","Dimension Value Code");

               TempDimSetEntry."Dimension Code" := "Dimension Code";

               TempDimSetEntry."Dimension Value Code" := "Dimension Value Code";

               TempDimSetEntry."Dimension Value ID" := DimValue."Dimension Value ID";

               TempDimSetEntry.INSERT(TRUE);

               NewDimSetID := DimMgt.GetDimensionSetID(TempDimSetEntry);

  • Morten Steengaard Profile Picture
    555 on at
    RE: How to create a General Journal Line record with dimensions?

    Hi Suresh Kulla,

    Thank you very much!

    Best regards,

    Morten

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,791

#2
YUN ZHU Profile Picture

YUN ZHU 2,091 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 2,090

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans