Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
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,640 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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,558 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,645 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans