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

What filter values to use when calling G/L Balance by Dimension over OData on Business Central OnPrem

(0) ShareShare
ReportReport
Posted on by 5

Hi

I'm trying to get general ledger data by dimension using the OData interface on an OnPrem BC instance.

I've published page 408 "G/L Balance by Dimension" as a web service called GL_Balance_by_Dimension.

I'm using the REST client extension in VSCode to execute my call with the relevant url, tenant and company parameters filled in:

@rows = 'G/L Account'
@cols = 'Period'
GET https://{{url}}:18143/{{tenant}}/ODataV4/Company({{company}})/GL_Balance_by_Dimension?$filter=LineDimCode eq {{rows}} and ColumnDimCode eq {{cols}} HTTP/1.1
Authorization: Basic {{user}} {{wak}}
Content-Type: application/json

{
}

I only ever get an empty array returned:

HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/json; odata.metadata=minimal
Content-Encoding: gzip
Server: Microsoft-HTTPAPI/2.0
OData-Version: 4.0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Date, Content-Length, Server, OData-Version
request-id: 2b81c6fb-bc03-42f1-bee6-b77c1fb9229c
Date: Wed, 14 Dec 2022 11:47:47 GMT
Connection: close

{
"@odata.context": "https://*url*:18143/*tenant*/ODataV4/$metadata#Company(*company*)/GL_Balance_by_Dimension",
"value": []
}

I've tried to pass in more of the properties and filters specified in the metadata without a change in the results.

I suspect that the values I use in the LineDimCode and ColumnDimCode property filters are incorrect but I can't find what other values I can use. These are values that work if I run the page in GUI.

BTW - To verify my approach I have tried setting up, calling and filtering Chart_of_Accounts - that works as expected.

Where can I find the correct values for the properties in the $filter to use when executing a call to GL_Balance_by_Dimension?

Many thanks

Thorbjorn

I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,397 on at

    hi

    look this

    learn.microsoft.com/.../dynamics_account_get

    DAniele

  • Verified answer
    YUN ZHU Profile Picture
    95,681 Super User 2025 Season 2 on at

    Hi, If you open this page directly on BC, it will also display a null value. So it is also a null value when Odata accesses. Its logic is on the action before the page is opened.

    So you can't use this page, you can only customize a new page.

    pastedimage1671150466584v1.png

    pastedimage1671150488360v2.png

    pastedimage1671150502140v3.png

    Hope this helps.

    Thanks.

    ZHU

  • Thorbjorn Njalsson Profile Picture
    5 on at

    Thank you ZHU.

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 2,606

#2
YUN ZHU Profile Picture

YUN ZHU 931 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 773 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans