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)

Get ALL marked records from form including rows not visible.

(0) ShareShare
ReportReport
Posted on by

Hello!

I'm trying to select marked records from a grid and loop through them to perform some processing, but the problem I'm having is the datasource will only find 39 records (the number of visible rows), even though I may have 100 or more.

I'm using code patterned after the following:

    studentLocal = student_ds.getFirst(1);
    
    while (studentLocal)
    {
        info(studentLocal.Name +" " +studentLocal.ID);
        studentLocal = student_ds.getNext();
    }

This is expected behavior because a datasource is made to display the information, not buffer up everything in the table. Scrolling to the last selected records will bring more data in, but this to me seems to be an unreliable approach.
Does anyone know of a good way to select records in a datasource grid and have AX return more than the visible rows without scrolling up and down to force the buffer to fill?

Thanks.

 

 

 

*This post is locked for comments

I have the same question (0)
  • Heinz Schweda Profile Picture
    1,367 on at

    Hi, have you tried using MultiSelectionHelper?

  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at

    I think you should use data source query.

  • Scott_F. Profile Picture
    on at

    Hello Heinz Schweda,

    Yes. Its nice to use, but still didn't retrieve the records beyond my visible rows. It stops at 39.

  • Verified answer
    Scott_F. Profile Picture
    on at

    Hello Crispin.

    Yes. You and Rustem Galiamov are right.

    This is the limitation to using the datasource from a form for selecting and processing multiple records.

    I cannot see anyway around it through property settings or whatnot.

    The solution I'm employing is to add a boolean 'marked' column on the grid and using the query generated by the datasource to check and uncheck the marked column.

    By way of that code, I will select and update the records.

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