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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Limit number of records returned by view

(0) ShareShare
ReportReport
Posted on by

I have one view and this view returns more than 5.000 records.
I want to return only one record. All records are created on the same day so I cannot use sorting by CreatedOn column.

I used FetchXML Builder to modify view definition and now it is like this:

<fetch version="1.0" top="1" output-format="xml-platform" mapping="logical">

When I execute this view in FetchXML Builder i get only one row in results.

After I saved this view in CRM I tried to get records and I still see more than 5.000 records.
The requirement is to return only one record.

CRM version: 1612 (9.0.19.8) (DB 9.0.19.8) on-premises

I have the same question (0)
  • Community Member Profile Picture
    on at

    I have one view and this view returns more than 5.000 records.
    I want to return only one record. All records are created on the same day so I cannot use sorting by CreatedOn column.

    I used FetchXML Builder to modify view definition and now it is like this:

    <fetch version="1.0" top="1" output-format="xml-platform" mapping="logical">

    When I execute this view in FetchXML Builder i get only one row in results.

    After I saved this view in CRM I tried to get records and I still see more than 5.000 records.
    The requirement is to return only one record.

    CRM version: 1612 (9.0.19.8) (DB 9.0.19.8) on-premises

  • Community Member Profile Picture
    on at

    I have one view and this view returns more than 5.000 records.
    I want to return only one record. All records are created on the same day so I cannot use sorting by CreatedOn column.

    I used FetchXML Builder to modify view definition and now it is like this:

    <fetch version="1.0" top="1" output-format="xml-platform" mapping="logical">

    When I execute this view in FetchXML Builder i get only one row in results.

    After I saved this view in CRM I tried to get records and I still see more than 5.000 records.
    The requirement is to return only one record.

    CRM version: 1612 (9.0.19.8) (DB 9.0.19.8) on-premises

  • Community Member Profile Picture
    on at

    I have one view and this view returns more than 5.000 records.
    I want to return only one record. All records are created on the same day so I cannot use sorting by CreatedOn column.

    I used FetchXML Builder to modify view definition and now it is like this:

    <fetch version="1.0" top="1" output-format="xml-platform" mapping="logical">

    When I execute this view in FetchXML Builder i get only one row in results.

    After I saved this view in CRM I tried to get records and I still see more than 5.000 records.
    The requirement is to return only one record.

    CRM version: 1612 (9.0.19.8) (DB 9.0.19.8) on-premises

  • Esteban Coto Alfaro Profile Picture
    on at

    Hello, it should work, but a question after saving it, it also has been published?

    Thanks!

    Community Support Team - Esteban

    If this Post helps, then please consider Accept as solution to help the other members find it more quickly.

  • Community Member Profile Picture
    on at

    Hi,

    did you publish the entity after saving the view?

  • Suggested answer
    SamiraM Profile Picture
    587 on at

    Try count like below:

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" count="10">

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans