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

Notifications

Announcements

No record found.

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
    95,327 Super User 2025 Season 2 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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,226

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,047 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,257 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans