Forum Discussion

cdebackere's avatar
cdebackere
Icon for Resolver I rankResolver I
1 year ago
Solved

Data refresh not working : OK on desktop, NOK on Service - 'dynamic data sources'

I have a properly working powerbi in desktop that I want to move to the Service.   When trying to trigger a data refresh I get the error (freele translated from Dutch) 'This dataset contains a dyna...
  • cdebackere's avatar
    cdebackere
    1 year ago

    I eventually found the cause why I still got the dynamic source error:

     

    in the code above I simplified the code as

     

    baseurl = "https://X.Y.Z/soap/3/orga_test"

     

    But in reality baseURL was calculated based on a boolean 'useTestURL', which then choose between 2 parameters: the prodURL and the testURL.

     

    So, the baseURL used in the web.Contents was indeed dynamic. 

     

    The solutions was: since test and prod have the same bare URI, I've split that part into a seperate parameter which is fixed. And the test/prod is now inserted are part of the relativePath.

     

    baseurl = "https://X.Y.Z/soap/3/"

    relPath = if useTest then testRelPath else prodRelPath

    apiEndPoint = "getObjects"

    cnt = Text.ToBinary("Some SOAP XML")

    and then calling

    Web.Contents(baseurl, [RelativePath=relPath & "/" & apiEndPoint, Content=cnt])

    So stupid