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 :
Microsoft Dynamics AX (Archived)

How to limit a number of records loaded when a ListPage is open?

(0) ShareShare
ReportReport
Posted on by 105

Hi,

I've been trying to find out an answer to a question which probably belongs to a "common knowledge" domain, but unfortunately those tricks I tried by far haven't brought me anywhere...

I have a ListPage form in AX 2012 which loads a very large number of records (over 30000). The query uses aggregate functions and groupings over even larger amount or records. No wonder it takes long for the form to load.

What I need is a way to load only a handful of records initially, just enough to fill a screen or two, not the the whole lot of 30000+. When scrolling the form down, a new bunch of records should be requested, but again, not the whole lot. 

The query used to populate a form is properly indexed,  it returns a small number of records (few hundreds) real fast, so the only problem is to make AX to send such requests for small portions of data.

Any ideas please!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Dick Wenning Profile Picture
    8,705 Moderator on at

    just add the correct properties on the form.

    things like find first fast on the query

    on the datasource use onlyfatchactive

    those realy make a difference.

    also avoid innerjoins incase of more than 100.000 records

  • Suggested answer
    Dick Wenning Profile Picture
    8,705 Moderator on at

    Leo did it work out?

  • Leo Fox Profile Picture
    105 on at

    Hi Dick,

    thank you for your input.

    I guess my ListPage form wasn't written properly to start with: there was no AX Query object on AOT, no interaction class, all the loads/refreshes were done in the code calling data source refresh methods. That was why the properties "onlyfetchactive" didn't make any difference: the whole dataset was loaded and reloaded again and again...

    I'm in the process of re-writing the form the way Microsoft recommends for ListPage and the results look promising: the form gets only portions of data and the performance has drastically improved. I'm setting "onlyfetchactive" on the form and "firstfast" on the query. Seems like the problem for me now shifted in a different direction: at the time I set initial values on newly added controls (like a checkbox) an exception gets thrown telling "FormCheckBoxControl object not initialized", although a constructor super() is called at the top of the method... I'm still missing something...

  • Verified answer
    Leo Fox Profile Picture
    105 on at

    Hi , just confirming that after

    1) changing the form such as to define datasources through AOT Query rather than straight from an existing View and

    2) setting properties FirstFast=Yes on the Query and OnlyFetchActive=true on the datasource

    the goal was achieved: a small subset of all the available records is now retrieved on a form load.

    Thank you Dick

  • Suggested answer
    Community Member Profile Picture
    on at

    to limit the number of visible records on the listpage...

    type set the properties of the Grid on the ListPage

    For Grid we have one property called 'VisibleRows'

    Validate by setting this property and see if it is fine as per your requirement

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans