D365 Finance & Operations and Dynamics AX Forum

Expand all | Collapse all

Grid on custom form only displays up to 25 records

  • 1.  Grid on custom form only displays up to 25 records

    Posted Feb 12, 2021 10:39 AM
    In D365, I duplicated the all production orders form and used it as the basis for a custom form, changing the data sources and fields accordingly and it all seems to work fine--except that the lines grid (displaying the child records of the selected parent record) will only display a maximum of 25 child records, even when there are hundreds. The scroll bars allow you to scroll among the 25, but will not display more on either end. However, if I export all rows from the grid, they all appear in the Excel worksheet that is generated.

    Does anyone know why the grid is limited to a maximum of 25 rows and how I can fix it?

    Kirk Blackburn
    Engineer - Software Development
    The Church of Jesus Christ of Latter-day Saints
    Salt Lake City, UT

  • 2.  RE: Grid on custom form only displays up to 25 records

    Posted Mar 08, 2021 09:33 AM
    Hi Kirk,
    I don't have an exact answer for you, but I have a little bit more information that might help.
    When a form loads data from the table into a form, most of the time the data source on the form has a 'join type' of 'delayed'.  You can view this by finding the form in the AOT and looking at the datasources.  The 'delayed' type join is not actually a real 'sql' join, but it tells dynamics to only load the records from the database that can be seen on the screen.  It does this to save on performance.  If you have many thousands of records in a table, the system only needs to find and load the first bunch that can fit on the grid.  Then, if the user scrolls down on the grid, the system will load more data.  This allows the form to open even faster.
    All that said, this does not seem to be working properly.  You said that scrolling down in the grid is not showing more records.
    You could push ctrl-g, while selecting the lines grid.  This will open the filters on the top of each column.  You can see if there happens to be a filter that is somehow restricting the data to only the 25 records.  Even though this seems unlikely.
    You also could open 'sql server profiler' and start a sql trace, then open the form, then stop the trace.  This would allow you to look at what sql query was run against the database.  This might help tell you if there is an unseen filter being applied to the query that is being run.  But I realize this might be a bit too technical.

    Most likely, I would check the 'join types' on your form datasource properties, and see if perhaps one of those is sent incorrectly.  As that seems the most likely culprit.


    Peter Ramer
    Greenwood Village CO

If you've found this thread useful, dive deeper into User Group community content by role