web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Trying to develop a nested api call for chart of accounts - could use some direction.

(0) ShareShare
ReportReport
Posted on by 5

Hello, 

I am trying to create an api in laravel hitting our business central for an external site.   

In the chart of accounts, the user wants to have a view of their total balance and net change. Then, they want to be able to filter down by dimensions.  They should be able to have filter where they can toggle on a dimension, and choose a valueCode of that dimension to get the total net change and balance of ledgers containing the valueCode. 

I've been able to hit into the general ledger, per account, expanding the dimensionSetLines to see codes and valueCodes. 

It seems there isn't a way to only pull general ledger entries where the nested dimensionSetLines contains a dimension code, and a specific codeValue.  Is this something that will have to be handled after retrieving all of the general ledgers? 

Is there an easier way that I am not realizing for both of these? Right now I think I need to pull all of the accounts, then for each account, add the netChange, then, expand the trialBalance to add the balances, but if a filter is active, I grab all general ledgers per account, expand the dimensionSetLines to see the codes and filter the valueCode, and add the ledgers individually.

We also need date range filters, but that might be a battle for another day. 

Thanks

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 674 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 362 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 359 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans