Forum Discussion

Sean-OReilly's avatar
Sean-OReilly
Helper IV
1 year ago
Solved

Need Help - Data source error - The OData connector failed

Hi  My Power Bi dataset is not refreshing as a result of the below error: Data source errorExpression.Error: The OData connector failed with the following error: We cannot convert the value null to...
  • Mich00's avatar
    1 year ago

    Hi Sean-OReilly ,

     

    The latest version of the connector no longer permits the 4th parameter to be null within the source (Source = Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, null), .

     

    To fix this you will need to change the last 'null' to '[UseReadOnlyReplica = null]' within the Advanced Editor.

     

    • Open the powerbi desktop report 
    • Select Transform data 
    • Select and highlight your Business Central related query
    • Open Advanced editor
    • Replace the last 'null' with '[UseReadOnlyReplica = null]'
    • Ok 
    • Close & Apply once updated to all BC related queries

      EG:

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

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

       

      Hope this helps 🙂