Forum Discussion
Bit of help to identifying a dynamic data source
- 4 months ago
Hey, mike_asplin ,
basically in your case, you can jsut do this:
let BaseUrl = "https://chxxxxd.api.crm11.dynamics.com", Endpoint = "api/data/v9.1/bookableresourcebookings", SelectColumns = "bookableresourcebookingid,_bookingstatus_value,_resource_value,name,_cha_clientid_value,_owningteam_value,duration,starttime,_cha_carercontactid_value,_msdyn_workorder_value,msdyn_totalcost,endtime,statuscode,msdyn_milestraveled,msdyn_actualarrivaltime", FilterDateText = DateTime.ToText(#"Load Date", "yyyy-MM-ddTHH:mm:ssZ"), QueryRecord = [ #"$select" = SelectColumns, #"$filter" = "starttime ge " & FilterDateText ], Source = Json.Document(Web.Contents( BaseUrl, [ RelativePath = Endpoint, Query = QueryRecord ] )), Data = Source[value] in DataThe most important part, and what causes the Dynamic Source flag, is the splitting the host and relative path:
BaseUrl = "https://chxxxxd.api.crm11.dynamics.com",
Endpoint = "api/data/v9.1/bookableresourcebookings",
Sorry last question. i am triyng to get this thing so it will refresh in the service. Apart formt his query every other query is either a sharepoint file or a CDS source. I had some OData sources but changed them all the CDS
Whne i try to refresh it online i am getting an OData error, but the OData has disappeared from the cloud conenctions and from the data source credentials. This query isnt an OData query is it? just cant work what is causing the issue. Thanks
Hey, mike_asplin ,
it will be a 'Web' connection, there you can authenticate with Organization Account / OAuth2 in Service.
OData indeed should not appear there.