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