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...
Suggested answer

How to create and fill a G/L Register to view all applied entries after running a report?

(0) ShareShare
ReportReport
Posted on by

Hey guys,
I plan to do the following:

I have a report that I can use to apply all my  open entries. Now I would like to see which payment was applied with which credit.

For this I want to create something like a G/L Register. I would use a classic G/L Register as a guide.

Have you ever done something like this?
Where in my report should I position myself so that I can then write the data to a separate table? This table should be my G/L Register.

Thank you ;)

  • Suggested answer
    Lars Lohndorf-Larsen Profile Picture
    on at
    RE: How to create and fill a G/L Register to view all applied entries after running a report?

    Hi,

    There is of course a number of different ways to do this, and without knowing the customer and exact requirements, here is my ideas, based on the standard application (codeunit 12):

    The register is initialized at the beginning of the process:

    [Function StartPosting]

    GLReg.LOCKTABLE;
    IF GLReg.FINDLAST THEN
    GLReg."No." := GLReg."No." + 1
    ELSE
    GLReg."No." := 1;
    GLReg.INIT;
    GLReg."From Entry No." := NextEntryNo;
    GLReg."From VAT Entry No." := NextVATEntryNo;
    GLReg."Creation Date" := TODAY;
    GLReg."Creation Time" := TIME;
    GLReg."Source Code" := "Source Code";
    GLReg."Journal Batch Name" := "Journal Batch Name";
    GLReg."User ID" := USERID;
    IsGLRegInserted := FALSE;

    Then during the process, the entry numbers can get incremented as they get processed. And then in the end, the register gets inserted.

    I think that this makes it easy to collect all the needed data in the register because anywhere you are applying entries, you can update the register at the same time as you go along. The disadvantage may be performance, since you lock the table during the whole process, so if you need to write this for heavy multi user scenarios, then I would consider another solution of maybe collecting it all into a temp table, but only insert the register at the end of the process.

    Just some ideas - again without knowing everything that the process needs to do. Hope it helps.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
YUN ZHU Profile Picture

YUN ZHU 491 Super User 2025 Season 1

#2
Sagar Dangar, MCP Profile Picture

Sagar Dangar, MCP 358

#3
Mansi Soni Profile Picture

Mansi Soni 327

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans