Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
DekkerNick
Frequent Visitor

salesOrderLines API from Business Central gives error

When I would like to retrieve salesOrderLines from Business Central in PowerBI, I get the following error message. 

DataSource.Error: Dynamics365BusinessCentral: Aanvraag mislukt: De externe server heeft een fout geretourneerd: (400) Ongeldige opdracht. (You must specify an Id or a Document Id to get the lines. CorrelationId: 763e20e8-0a35-49a1-9ffd-ec50e146a050.)
Details:
DataSourceKind=Dynamics365BusinessCentral
DataSourcePath=Dynamics365BusinessCentral
Url=https://api.businesscentral.dynamics.com/v2.0/ACCEPTATIE/api/v2.0/salesOrderLines?company=Schut Papier

This is the source. 

let
Bron = Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, null),
ACCEPTATIE = Bron{[Name="ACCEPTATIE"]}[Data],
#"Schut Papier" = ACCEPTATIE{[Name="Schut Papier"]}[Data],
#"v2 0" = #"Schut Papier"{[Name="v2.0"]}[Data],
salesOrderLines_table = #"v2 0"{[Name="salesOrderLines",Signature="table"]}[Data]
in
salesOrderLines_table





1 REPLY 1
RonW
New Member

Looking for the same solution. Just found this (which helped me): Solved: Connecting to Dynamics 365 Business Central API v2... - Microsoft Fabric Community 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.