Forums

Forums / General Discussions / More Than 5000 records from Saved Queries

More Than 5000 records from Saved Queries

3 posts, 1 answered
  1. Sharat veer
    Sharat veer avatar
    1 posts
    Registered:
    18 Aug 2023
    18 Aug 2023
    Link to this post
    Hi All, I have a requirement where using saved query (fetch query) need to fetch more than 5K records from dynamics.
  2. Rawdon Edghill
    Rawdon Edghill avatar
    76 posts
    Registered:
    16 Dec 2020
    18 Aug 2023
    Link to this post
    Hi Sharat,

    Unfortunately, the Fetch XML is limited to 5000 records.

    Regards,
    Rawdon 
  3. Rawdon Edghill
    Rawdon Edghill avatar
    76 posts
    Registered:
    16 Dec 2020
    Answered
    18 Aug 2023
    Link to this post
    Hi Sharat,

    This is a limitation of FetchXML as implemented by Microsoft in the CRM and is not a limitation put in place by TPC. If more than 5000 records is required, they will need to implement their own web service endpoint to replace the Saved Query that can use the paging cookie that a call to CRM returns when there is more than 5000 records.

    An example of using the paging cookie can be found here: https://medium.com/@furkankaracan/dynamics-365-retrieve-more-than-5000-records-with-fetchxml-d7963886199e

    Regards,
    Rawdon
3 posts, 1 answered