web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

XRMToolBox - FetchXML Builder

(0) ShareShare
ReportReport
Posted on by 85

Hi, 

How can you export to excel your FetchXML results?

Thanks

Categories:
I have the same question (0)
  • Mahadeo Matre Profile Picture
    17,021 on at

    Hi..

    Make same filters in Advanced find on entity and then you can easily export to excel.

  • Teach Me Profile Picture
    85 on at

    It's not a view. It's audit logs so I can't open it in CRM.

  • Mahadeo Matre Profile Picture
    17,021 on at

    you can copy xml result from xrmtoolbox, and create XML file.

    and open xml file in excel. When you open xml file in excel, excel will ask how to open xml file.

    After opening xml file in excel, you can hide columns which are not required.

    hope this will help.

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    You can try "Export to Excel", "Data Exporter" or "Advanced FetchXML Tester" plugin to export the fetchxml results to excel.

    plugin.png

  • Teach Me Profile Picture
    85 on at

    I can only seem to be able to open the query, but not the results. I tried with all 3 options to open the XML, but none of those give me the results.

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Are you saying you are not getting the option to ecport to excel in any of these plugin?

  • Teach Me Profile Picture
    85 on at

    I can't see the results in Excel when I open the XML in Excel, only the query.

    With the XRM Tool Box the Export to Excel doesn't have an option to select Audit so I can't work from my FetchXML. I tried the Data Exporter, I could paste the FetchXML, but it was running for a few minutes and then it gave me a runtime error.

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Can you share the fetchxml you are trying? It is also possible that the data returned is too huge and the tools are experiencing timeout?

  • Teach Me Profile Picture
    85 on at

    Hi Ravi,

    Sure, here is it:

    <fetch distinct="false" no-lock="false" mapping="logical" >

     <entity name="audit" >

       <attribute name="createdon" />

       <attribute name="action" />

       <attribute name="userid" />

       <attribute name="objectid" />

       <attribute name="objecttypecode" />

       <order attribute="createdon" descending="true" />

       <filter type="and" >

         <condition attribute="action" operator="eq" value="64" />

       </filter>

       <link-entity name="systemuser" from="systemuserid" to="objectid" link-type="outer" alias="SystemUser" >

         <attribute name="fullname" />

         <attribute name="windowsliveid" />

         <attribute name="businessunitid" />

         <attribute name="isdisabled" />

       </link-entity>

     </entity>

    </fetch>

    I had this idea from here:

    www.concurrency.com/.../creating-an-audit-report-for-user-logins-in-dynami

    Basically the end goal would be to be able to export to excel the users with their log dates and times.

    Many thanks,

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    I tried Advance Fetch XML Tester tool and it worked as expected i.e. fetch returned me the results and I was also able to export them. It is possible that tou have more records and the tools is not able to handle those many records. Try putting a top count on your fetchxml and see if it works.

    ========

    <fetch distinct="false" no-lock="false" mapping="logical" top="50" >

    <entity name="audit" >

      <attribute name="createdon" />

      <attribute name="action" />

    ..

    ..

    ..

    =============

    3288.audit.png

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Dynamics 365 general

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans