Overview
=GL (What, Account, Start Date, End Date,…, Data Source)
Purpose: GL Function returns the budget, balance, net change, debits, or credits of the Dynamics NAV or Business Central G/L Account of a given company, based on filters.
GL Function Reference (for NAV and BC)
GL function is one of many Jet functions like NF, NP and NL etc. Below are the parameters and their description.
Parameter | Description |
What | Determines what the GL function returns. The options are given below: 1) Balance 2) Budget 3) Credits 4) Debits |
Account | Provides a list for the G/L Account Number. You can select a single account or a range of accounts. |
StartDate | You are supposed to enter the starting date of transactions to include. Leave StartDate blank while checking the balance of an account on a given date. If you are interested in the net change of an account, use Balance and specify both the StartDate and EndDate. |
EndDate | You are supposed to enter the end date of transactions to include in the GL Function. Specifying a range of date will give you the net change between the first day of the start period and the last day of the end period. Leaving start period or end period blank will give you the present balance/budget. |
View | The G/L Analysis View to use. Leave this blank to use balances from the G/L directly. |
Business Group Code | Filter for the Business Group Code. The available options are: 1) Corporate 2) Events 3) InterCompany 4) Sports |
Customer Group Code | Filter for the Customer Group Code. The available options are: 1) InterCompany 2) Large 3) Medium 4) Small |
Company | Specify the name of the company in this GL Function. This must be spelled the same as it appears in NAV/BC, including case, spaces and punctuation. If this parameter is empty (“”), the default company in the Jet Reports Options/Data Sources Screen is used. |
Exclude Close | “True” to exclude closing date transactions. Defaults to “False”. |
Cache Tables | GL data from the source table for this function will be retrieved and cached, if the value of the Filter argument is “True”. This improves performance for some reports. |
Data Source | It is used to specify the name of the data source. If left blank, the default data source is used. |
Examples of the GL function
To retrieve the balance of G/L account 44000, you would use the following:
fx =GL(“Balance”,”44000″)
This GL returns the net change of account 44000 between 1/1/2021 and 1/31/2021…
fx =GL(“Balance”,”44000″,”1/1/21″,”1/31/21″)
For the Budget of account 40000 with Business Group Code as CORPORATE, you can use the following:
fx =GL(“Budget”,”40000″,,,,”CORPORATE”)