Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello community,
I have my data source as MS business central. When I refresh on desktop, it works fine without any errors. However, when scheduled refresh or manual refresh online, it returns the below error.
Data source error: Expression.Error: The OData connector failed with the following error: We cannot convert the value null to type Record... . The exception was raised by the IDbCommand interface. Table: LotNoInformationList.
Cluster URI: WABI-UK-SOUTH-B-PRIMARY-redirect.analysis.windows.net
Activity ID: 50d92772-e7ba-4953-8dd1-dd60c4ec3044
Request ID: d9f0b6f9-b3c6-1882-5d96-93f34fb03110
Time: 2024-09-03 15:35:47Z
Similar error on all my reports with various datasets. This triggered today morning onwards.
I did try to remove the 'null' from the dataset, but still the error persists.
Any tips on how to resolve it?
Many thanks.
Solved! Go to Solution.
The latest version of the connector no longer permits the 4th parameter to be null.
Please try the following solution:
Before:
Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, null)
After:
Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, [UseReadOnlyReplica = null])
This worked. Thank you so much.
It worked - Thank you so much!!!!!
How do I change that and where from please?
In your powerbi desktop report > Transform data > select and highlight your Business Central related query > open Advanced editor > replace the first line as described above > Ok > Close & Apply once updated to all BC related queries
In Power BI desktop reports > transform data>
I can't open the advanced editor when multiple queries are selected. The advanced editor option is greyed out. How do you access the advanced editor with multiple queries selected?
Unfortunately, you will need to edit each query one-by-one as each queries code in advanced editor can be different.
I did remove all NULL values manually. But still it is not working. Let me know if you manage to solve the issue.
Before:
Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, null)
After:
Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, [UseReadOnlyReplica = null])
I'm getting the same error and it is only from reports that use Business Central as the data source.
Can you post the error?
yes, Same here.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 56 | |
| 55 | |
| 32 | |
| 18 | |
| 14 |