Skip to main content

Posts

Showing posts with the label Queries

How to Group and Consolidate General Journal Lines Using Query Object in Business Central.

Hi All, I received a question from a fellow developer to create consolidation entries from general Journal Lines. In this blog we will discuss how to customize business central the correct way. How you can write code to sum up lines with multiple fields in a journal for consolidation. Short Answer You can consolidate General Journal Lines in Business Central by using a Query Object to group records by Posting Date, Account No., and Dimension Set ID, aggregate amounts using SUM, and then insert the consolidated results into a target journal batch using AL code.