I am not sure if this should be raised here or in a Power BI Forum.
I am new to Business Central and Power BI and I am trying to create a report which lists the transactions in the general ledger and them be able to drill down to get the sales invoice details.
I have picked up the General Ledger transactions from Advanced APIs -> Microsoft/reports/Finance/beta -> generalLedgerEntries and can drill down into Standard APIs v2.0 -> salesInvoices to get the invoice header information, however I am unable to pull through the sales invoice lines. I can do this for a single invoice by clicking the right clicking the Table entry in the salesInvoiceLines column and adding a new query however this creates a table for a single invoice. I have tried using the Standard APIs v2.0 -> salesInvoiceLines data source to create a query however this returns an error below:
DataSource.Error: Dynamics365BusinessCentral: Request failed: The remote server returned an error: (400) Bad Request. (You must specify an Id or a Document Id to get the lines. CorrelationId: ???.)
Details:
DataSourceKind=Dynamics365BusinessCentral
DataSourcePath=Dynamics365BusinessCentral
Url=https://api.businesscentral.dynamics.com/v2.0/PRODUCTION/api/v2.0/salesInvoiceLines?company=???
Is what I am trying to create possible with Power BI or should I be looking at a different solution.