Forum Discussion
undefinedPower BI error NULL
- 1 year ago
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])
I've had the same happen to me today - absolute nightmare!
Opened a ticket with Microsoft and they suggested the following (neither of which has resolved the issue)
- Are you utilizing the latest version of Power BI Desktop to ensure compatibility and feature support?
- The dataset might contain null or empty values that the OData connector cannot process as a Record type. So, are there any null or empty values in the source data? If yes, try to remove these values.
So currently manually updating 30+ reports in preparation for tomorrow morning...
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])
- Anonymous1 year agoNot applicable
Hi,
Thanks for the suggested solutions.
null, null, null , [userReadOnlyReplica = null
seems to work,
null, null
Doesn't work with my reports.
Any idea why this connector update/ change wasn't communicated? It has a large effect.
Now I have to update alot of tables in alot of reports.
Any idea if there will be another update to fix this?
Or does anyone have a hint on how to change this in a way other thatn opening all tables from all affected reports in the advanced editor and change the first few lines?
(I'll make a base table with the route to the database and link to this table in all the other tables, like a parameter.
So that when another update is required I only have to change one table) - pdolan_tapco1 year agoFrequent Visitor
Where is the lastest version documentation that tells me this?
- keinshah1 year agoHelper I
How do I change that and where from please?
- virakones1 year agoAdvocate I
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
- Anonymous1 year agoNot applicable
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?
- Hittheroof241 year agoRegular Visitor
It worked - Thank you so much!!!!!
- keinshah1 year agoHelper I
This worked. Thank you so much.
- gvol101101 year agoNew Member
are things like this published anywhere? why do we need to find out about this thru research?
- Hittheroof241 year agoRegular Visitor
I couldn't find anything. In fact, I had opened a ticket with Microsoft Support and I had to tell them the solution!
- Prasooth1 year agoRegular Visitor
Thanks Dejan-Pajk,
We got this error from 08/09/2024 1 am onwards, after researching hours, I finally found your solution, and it fixed our problem.
Many Thanks,
Prasoothan
- Anonymous1 year agoNot applicable
It works! Thank you Dejan-Pajk!
- Shaishavm1 year agoAdvocate I
Thanks Dejan-Pajk, I use webservices from Business Central with following code.
Appreciate if you could suggest a resolution on this?
Source = Dynamics365BusinessCentral.EnvironmentContents(null, null)
Thanks and Regards,
SM
- Shaishavm1 year agoAdvocate I
Hi Dejan-Pajk thanks a ton for the solution. Work-around is working fine. I also noticed that Microsoft has released an incident request acknowledging the bug and that they are working on a fix.
- Anonymous1 year agoNot applicable
Hello Dejan,
Thank you for the solution. The original problem for me is the below two error codes:
1) 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: TableName.
2) Failure details: The last refresh attempt failed because of an internal service error. This is usually a transient issue. If you try again later and still see this message, contact support.
<ccon>Expression.Error: The OData connector failed with the following error: We cannot convert the value null to type Record... </ccon>. The exception was raised by the IDbCommand interface. Table: TableName.
Since, I have the following:
OData.Feed("https://XXXX.dynamics.com/data/", null, [Implementation="2.0"])
XXXX = Companyname
I was trying to replace null with [UseReadOnlyReplica = null] and it is giving below error.
Expression.Error: OData: The header with name 'UseReadOnlyReplica' has a value type 'Null' that is invalid. Only DateTime, Logical, Number, and Text are supported.
How should we handle this? Could you please help?
Thank You and Regards,
Pavan.
- Dejan-Pajk1 year agoAdvocate II
Hi Pavan,
The solution mentioned above applies only to the Power BI connector (Dynamics365BusinessCentral.ApiContentsWithOptions), not to OData.Feed.
Therefore, replacing null will not resolve the issue with the OData.Feed connector.
You can find more documentation about OData here:
https://learn.microsoft.com/en-us/power-query/connectors/odata-feedBelow is an example that connects to Business Central web services:
OData.Feed("https://api.businesscentral.dynamics.com/v2.0/11111111-1111-1111-1111-111111111111/Sandbox/ODataV4/Company('Company Name')", null, [Implementation = "2.0"])
(replace 11111111-1111-1111-1111-111111111111 & Company Name)
Best regards,
Dejan- Anonymous1 year agoNot applicable
Thank you very Dejan, will try that