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])
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.
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-feed
Below 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