Forum Discussion

Lisi's avatar
Lisi
Regular Visitor
4 years ago
Solved

Getting Data via FetchXML from Dynamics

Hi, I'm trying to get data via FetchXML into PowerBI. I followed the steps described in Use FetchXML in Power BI with Dynamics 365 customer engagement | crm chart guy. 
I tried to connect but I always get a message, that the connection ist not possible because the string contains invalid characters. 

The generated URL is: https://xxxx.api.crm4.dynamics.com/api/data/v9.1/accounts?fetchXML=%3Cfetch+version%3D%221.0%22+output-format%3D%22xml-platform%22+mapping%3D%22logical%22+distinct%3D%22true%22%3E%0D%0A++%3Centity+name%3D%22account%22%3E%0D%0A++++%3Cattribute+name%3D%22name%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22address1_city%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22address1_postalcode%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22businesstypecode%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22statuscode%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22a24_firmentyp_opt%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22ownerid%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22accountnumber%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22a24_customerlifecyclecalc_opt%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22a24_br_groesse%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22primarycontactid%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22a24_letztereservierung%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22ifb_letztertermin%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22ifb_letztesseminar%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22a24_letztesseminar_dat%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22a24_letztertermin%22+%2F%3E%0D%0A++++%3Cattribute+name%3D%22accountid%22+%2F%3E%0D%0A++++%3Corder+descending%3D%22false%22+attribute%3D%22accountnumber%22+%2F%3E%0D%0A++++%3Cfilter+type%3D%22and%22%3E%0D%0A++++++%3Ccondition+attribute%3D%22statecode%22+operator%3D%22eq%22+value%3D%220%22+%2F%3E%0D%0A++++++%3Ccondition+attribute%3D%22a24_firmentyp_opt%22+operator%3D%22eq%22+value%3D%22602370001%22+%2F%3E%0D%0A++++%3C%2Ffilter%3E%0D%0A++++%3Clink-entity+name%3D%22systemuser%22+from%3D%22systemuserid%22+to%3D%22owninguser%22+link-type%3D%22inner%22+alias%3D%22ac%22%3E%0D%0A++++++%3Clink-entity+name%3D%22teammembership%22+from%3D%22systemuserid%22+to%3D%22systemuserid%22+visible%3D%22false%22+intersect%3D%22true%22%3E%0D%0A++++++++%3Clink-entity+name%3D%22team%22+from%3D%22teamid%22+to%3D%22teamid%22+alias%3D%22af%22%3E%0D%0A++++++++++%3Cfilter+type%3D%22and%22%3E%0D%0A++++++++++++%3Ccondition+attribute%3D%22a24_accountteamtype_opt%22+operator%3D%22in%22%3E%0D%0A++++++++++++++%3Cvalue%3E602370001%3C%2Fvalue%3E%0D%0A++++++++++++++%3Cvalue%3E602370007%3C%2Fvalue%3E%0D%0A++++++++++++%3C%2Fcondition%3E%0D%0A++++++++++%3C%2Ffilter%3E%0D%0A++++++++%3C%2Flink-entity%3E%0D%0A++++++%3C%2Flink-entity%3E%0D%0A++++%3C%2Flink-entity%3E%0D%0A++++%3Clink-entity+name%3D%22a24_account_owner_history%22+from%3D%22a24_account_owner_historyid%22+to%3D%22a24_current_owner_history_ref%22+visible%3D%22false%22+link-type%3D%22outer%22+alias%3D%22a_2771f6761a2b4868b8d7d758447e5d59%22%3E%0D%0A++++++%3Cattribute+name%3D%22createdon%22+%2F%3E%0D%0A++++%3C%2Flink-entity%3E%0D%0A++%3C%2Fentity%3E%0D%0A%3C%2Ffetch%3E

I changed the first part of the URL to publish here. Does anybody have any ideas? 

Thanks a lot in advance, Lisi


5 Replies