Skip to main content



No record found.

Microsoft Dynamics CRM forum

XML problems with Dynamics 365 Online

Posted on by 202

Hi everyone

This is the first time that I've worked with Dynamics & XML, so please forgive me if this is a stupid question!

I have created some XML using the FetchXML Builder tool in XRMToolBox as shown below:

<fetch top="50">
<entity name="contact">
<attribute name="serialnumber" alias="Serial" />
<attribute name="fullname" alias="Name" />
<attribute name="ownerid" alias="OwnerID" />
<filter />
<link-entity name="employment" from="sic_contactid" to="contactid" link-type="inner">
<attribute name="employernameorganisation" alias="Employer" />
<attribute name="employername" />
<condition attribute="employernameorganisation" operator="not-null" />
<link-entity name="principalobjectaccess" from="objectid" to="contactid">
<attribute name="principalid" alias="Shared_with" />

Ultimately I want to parse the XML via Excel so that I can then link the Excel spreadsheet containing the data to a Power BI report.

However, the XML shown above obviously doesn't have any connection strings in it for our incidence of Dynamics, so Excel doesn't know where to pull the data from. How would I go about achieving this?

Many thanks

  • Lucas H Profile Picture
    Lucas H 279 on at
    RE: XML problems with Dynamics 365 Online

    I'm not very familiar with Power BI but to get the data from D365 to Excel I would definitely use Power Automate.

    Use the List Rows Dataverse action and enter your FetchXML as a filter. Then use the Create Tabel Excel action which will add a table to a spreadsheet that you specify. You can then use Add A Row To A Table action for each row from your List Rows action to populate it.

    From there, you can have Power BI pull information from the spreadsheet.

  • JonClay Profile Picture
    JonClay 202 on at
    RE: XML problems with Dynamics 365 Online

    Hi Lucas

    Sorry for the late reply, but I've been away and offline for a few days.

    What I wanted to do was pull the data required using the FetchXML, put it into Power BI and marry it up with some data pulled from D365 using Power BI. To be honest, I've never used Power Automate. Would that be the best solution?

    Many thanks


  • Lucas H Profile Picture
    Lucas H 279 on at
    RE: XML problems with Dynamics 365 Online

    No stupid questions here!

    How are you applying the FetchXML to D365? Are you using Power Automate?

    Also, the FetchXML builder defaults to the top 50 records for the table you're querying - the "top: 50" property in your <fetch> tag. If you want ALL the records that fit your query you'll want to remove that.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .


André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,989 Super User

Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

nmaenpaa Profile Picture

nmaenpaa 101,148


Featured topics

Product updates

Dynamics 365 release plans