Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

How to display more than 5000 records in CRM Online Report using FetchXML

Posted on by 25

We have a requirement to implement a Report in CRM Online using FetchXML.

We were able to successfully create the FetchXML query, but when the output of the FetchXML query exceeds 5000 records, then Report is not working as expected.

Is there a way to retrieve more than 5000 records from FetchXML Query (to be used in Reports) in CRM Online ?

*This post is locked for comments

  • Suggested answer
    Drew Poggemann Profile Picture
    Drew Poggemann 9,079 on at
    RE: How to display more than 5000 records in CRM Online Report using FetchXML

    HI Santhosh,

    Another completely different option if you have a lot of this type of reporting needed through SSRS you might look at the replication of your database to Azure SQL and then utilize standard SSRS

    technet.microsoft.com/.../mt744592.aspx

    msdn.microsoft.com/.../ff519560.aspx

    Just another thought that might be overkill :)

    Thanks,

  • Suggested answer
    PS Profile Picture
    PS 23,577 on at
    RE: How to display more than 5000 records in CRM Online Report using FetchXML

    This is the only work around to use in fetch xml reports

    Otherwise you can also create a report from crm report wizard and it will show you all the records

  • RE: How to display more than 5000 records in CRM Online Report using FetchXML

    Thanks for your response Prashant.

    As mentioned in my initial post, we need to display more than 5000 records in a Report (which is hosted on CRM Online).

    As we cant use custom code in CRM Online Reports, we were looking for any possible workarounds.

  • Suggested answer
    Faizal Profile Picture
    Faizal 545 on at
    RE: How to display more than 5000 records in CRM Online Report using FetchXML

    Hi Santhosh,

    You can use "FetchXML aggregation".

    When you perform an aggregation, the maximum number that will participate in the aggregation will be 50,000 records. 

    http://us.hitachi-solutions.com/blog/2013/09/10/leveraging-aggregate-fetch-calls/

    https://msdn.microsoft.com/en-us/library/gg309565.aspx

    But if you need this for plugin/batch programs, i would suggest to use "paging cookies" om the fetch XML.

    https://msdn.microsoft.com/en-us/library/gg328046.aspx

  • Suggested answer
    PS Profile Picture
    PS 23,577 on at
    RE: How to display more than 5000 records in CRM Online Report using FetchXML

    Hi Santhosh,

    you will have to use paging cookie, if you want users to be able to see more than 5000 records. it can be achieved by both fetchxml and LINQ. Here's a URL which might help:

    https://msdn.microsoft.com/en-us/library/gg328046.aspx?f=255&MSPPError=-2147217396 

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans