Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

How to create a General Journal Line record with dimensions?

Posted on by 543

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?

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

    Hi Suresh Kulla,

    Thank you very much!

    Best regards,

    Morten

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 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);

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans