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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.