Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Form Grid Select All Records

(0) ShareShare
ReportReport
Posted on by 945

I have created a form and when I check the select all box it only selects 20 records or the ones that are loaded in the grid.  Can someone direct me to how i can have it select all records in the datasource instead of the loaded records.

I have tried changing the DS Delay Active = No

I have also tried this dynamicsuser.net/.../311603.aspx

Thanks

Eric

*This post is locked for comments

  • Javi Palomar Profile Picture
    5 on at
    RE: Form Grid Select All Records

    A good solution for the purpose you want is to simulate a key press in the code.

    #task

    ;

    element.task(#taskSelectAll);

    Where element is the callerform.

  • Eric Enlow Profile Picture
    945 on at
    RE: Form Grid Select All Records

    I ended up switching out my code to mimic this example and now everything is good.

    soft-maya.blogspot.com/.../retrieve-multiple-selected-records-from.html

    Thanks everyone for all the help and responses.

    Eric

  • Eric Enlow Profile Picture
    945 on at
    RE: Form Grid Select All Records

    Andre,

    thanks for the response.  My goal is to do this in code and not having the user do anything but click the check box.  At this point its my opinion that the check box doesn't function like one would assume and will work around it until i have a better understanding on how the grid/datasource and the select all(select all that is currently displayed) checkbox works

    Eric

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    295,408 Super User 2025 Season 1 on at
    RE: Form Grid Select All Records

    You can use the key combination Ctrl + Shift + End on a grid. Then AX will ask you to load and select every single record of the datasource.

  • Eric Enlow Profile Picture
    945 on at
    RE: Form Grid Select All Records

    Thanks Joris,  

    I took a quick stab at the link mentioned above.  I didnt have any luck.  I am using a staging table and not a system table so i wasnt able to translate the mentioned sample directly to my needs.  That probably due to my lack of experience.  I didnt want to spend a ton of time on this nor continue to bother you with the issues. I have a good work around and will circle back to this so i get a good understanding of how the helper works.

  • Eric Enlow Profile Picture
    945 on at
    RE: Form Grid Select All Records

    Daniel,

    Thanks for the response.  I think i will just add a new button that will update datasource using select forUpdate at the table and if the user wants to select specific records they can use the existing button which works fine.  This is a small part of the project so i can always circle back and by that time i will have more experience and have read 2 million more docs.

    Eric

  • Suggested answer
    Daniel Weichsel Profile Picture
    1,657 on at
    RE: Form Grid Select All Records

    Building on Joris's suggestion of pressing Ctrl+A, I have used a workaround a few times of pressing Ctrl+A then Ctrl+C to copy the grid contents to the clipboard -- the copying is what will actually load the whole data set.  Unfortunately, this puts the burden on the user each time instead of a development fix.

  • Suggested answer
    Joris dG Profile Picture
    17,775 on at
  • Eric Enlow Profile Picture
    945 on at
    RE: Form Grid Select All Records

    Joris,

    Thanks for the reply.  Unfortunately it is still only selecting 20 records.  Perhaps its something in the code i wrote that is limiting the records.  

    Once I select all by using CTR+A or the select all check box i am pressing a button which creates an array of the selected records using this line of code.  Unfortunately it is only returning 20 records.  

    myArray = FormDataSource_ds.recordsMarked();

    Then looping though the records using

    FormDataSource_ds.next();

    However if i scroll the grid it will increase depending on how much I scroll.

    Is there a better way to do this?  This is my first time using forms/grids and their datasources and based on what i have read so far this is what i have come up with.

    Thanks for the help

    Eric

  • Suggested answer
    Joris dG Profile Picture
    17,775 on at
    RE: Form Grid Select All Records

    Use the windows shortcut CTRL+A to select all, which on an AX grid will select all records. It will actually force all records to be loaded.

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 50

#3
shanawaz davood basha Profile Picture

shanawaz davood basha 6

Featured topics

Product updates

Dynamics 365 release plans