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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

The OData connector failed with the following error: We cannot convert the value null to type Record

I faced this issue on Power BI service where I am reading data from business central using Odata connector.

 

I also saw some posts on community with same issue.

 

please advice on the below

Idrissshatila_0-1725881101279.png

 

Status: Accepted
Comments
dmonzon
New Member

All updates are failing. It's chaos.

usbocajuniors
Regular Visitor

Have you tried the fix on the below link? 
https://www.reddit.com/r/PowerBI/comments/1f7yadg/data_conversion_error_on_refresh/

We encountered the same error and by adjusting the 4th parameter on the API call, the problem went away

Before:
Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, null)

After:
Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, [UseReadOnlyReplica = null])

AmilcarParraga
Frequent Visitor

It works!

Thanks @usbocajuniors 

v-xiaoyan-msft
Community Support
Status changed to: Accepted

Hi @Idrissshatila ,

 

We have seen on the internal platform that other engineers have reported this issue and submitted it.
The engineers on the product team are now aware and will do their best to resolve the issue. I will update here if there is any progress, please be patient.

As for now you may try the comments below to see if it helps!

 

Best regards.
Community Support Team_Caitlyn

effepunto
New Member

@usbocajuniors thanks man, this fix is working for me as well. I was going nuts.

usbocajuniors
Regular Visitor

@AmilcarParraga  and @effepunto , i am glad that the fix worked. Hopefully, the Microsoft engineering team is able to fully resolve the issue soon

Jwert
New Member

This is not working for me
Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, [UseReadOnlyReplica = null])

 

Update: 

It's working. I was doing something wrong. 🙂

maxpbi24
Frequent Visitor

Hi to everyone,

 

any updates?

 

If I've understood correctly, actually the possible solution would be to change manually the Power Query code (M) as follow:


Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, null)

Replace with:

Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, [UseReadOnlyReplica = null])

 

I did a test with a new report (pbix file), and by default the M code for this connector is still the first one (so by default an incorrect code is given). I hope that there will be a solution to avoid having to change the code manually each time in new and already published reports.

 

Thank you for your help.

Massimo

Chajtek2
New Member

Hey,

 

is there any ETA for the fix? I understand there is workaround, but I hope this bug will not force everyone in the community to fix all the endpoints...

 

BR

Anonymous
Not applicable

Hi all , 

Microsoft Fabric Support and Status | Microsoft Fabric

According to feedback on Microsoft Fabric support, the issue will have a fix deployed by the Mid to late September.
The current solution is: Customers will need to manually modify the query in the Advanced Editor by adding a record as the last parameter. Change the query from: Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, null) to: Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, [UseReadOnlyReplica = true])

 

Best Regards,
Community Support Team _ Ailsa Tao

This widget could not be displayed.