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)

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

I have the same question (0)
  • Suggested answer
    Joris dG Profile Picture
    17,775 on at

    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.

  • Eric Enlow Profile Picture
    945 on at

    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
  • Suggested answer
    Daniel Weichsel Profile Picture
    on at

    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.

  • Eric Enlow Profile Picture
    945 on at

    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

  • Eric Enlow Profile Picture
    945 on at

    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.

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    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

    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

  • Eric Enlow Profile Picture
    945 on at

    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

  • Javi Palomar Profile Picture
    5 on at

    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.

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans