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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

I want to enter (Dimension Set Entry) in the (General Journals) In the right way

(1) ShareShare
ReportReport
Posted on by 322
hi for all
 
I want your help in this case
 
I want to enter (Dimension Set Entry) in the (General Journals) screen and I have a dimension called (EMPLOYEE) I want to enter the dimension on (EMPLOYEE) and this is proven in the code but the strange thing is that it enters the dimension on (VEHICLES) and this is wrong and I want (EMPLOYEE)
 
 
 
 
This is my code
 
 
After execution, it gives me this message as in the picture
 
 
I chose in the code the dimension I want is (EMPLOYEE), but when executing it chooses the dimension (VEHICLES)????
 
 
 
I want the dimension (EMPLOYEE) and the employee number (104)
 
.؟؟؟؟؟
 
I have the same question (0)
  • Verified answer
    YUN ZHU Profile Picture
    97,970 Super User 2026 Season 1 on at
  • Verified answer
    CU09091051-0 Profile Picture
    322 on at
    Thank you very much Mr. YUN ZHU  because you always help me, and I am very happy that I benefit from your experiences.
     
    I got inspired from the following code links and the problem was solved.
     
     
                    DimensionCode := 'EMPLOYEE';
                    DimEmployee := '104';

                    IF (DimEmployee <> '') AND (DimEmployee <> '0') THEN BEGIN
                        IF NOT DimensionSetEntries.GET(0, DimensionCode) THEN BEGIN
                            DimensionSetEntries.INIT;
                            DimensionSetEntries.Validate("Dimension Code", DimensionCode);
                            DimensionSetEntries.Validate("Dimension Value Code", DimEmployee);
                            DimensionSetEntries.INSERT;
                        END;
                        DimensionSetID := DimMgt.GetDimensionSetID(DimensionSetEntries);
                        GenJournalLine.Validate("Dimension Set ID", DimensionSetID);
                    END;
                   
                  GenJournalLine.Insert();
     

    Thank you very much

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,161 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,046 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 932 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans