web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Mark all checkbox in Form grid

(0) ShareShare
ReportReport
Posted on by 209

Hi all,

i need help here, any input is appreciated.

in AR>all customers>Collect>Closed transaction editing

 5758.forum.png

i need to develop a button to select all and mark the checkbox.

but the checkbox is a data method in datasource, not a field, so im having a hard time.

Any input on how to do this is appreciated. Thanks.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    You need to iterate all data source records in your code and call the edit method for each record with parameter Set = true.

  • Blue Wang Profile Picture
    Microsoft Employee on at

    Hi Chel,

    I used a piece of code before.

    I hope it will help you.

    //step 1: Declartion
            Map  SelectionMap;
    //step 2 : Add method
            Map  SelectedPost(){
                return SelectionMap;
            }
    //step : 3 Add methods in Form datasource
            edit NoYesId Selection(boolean _set, datasourceName _datasourcename,NoYesId  _value)
            {
              if(_set)
              {
                if(_value)
                {
                    SelectionMap.insert(_datasourcename.RecId,_datasourcename);
                }
                else
                {
                    SelectionMap.remove(_datasourcename.RecId);
                }
               }
               return SelectionMap.exists(_datasourcename.RecId);
             }
    //step 4 : clikced method to call SelectAll
           public void clicked()
           {
            super();
            element.SelectAllNew();
           }
    //step 5 : SelectAllNew methods
           public void SelectAllNew()
           {
            if(ChkSelectAll.value())
              {
                Datasourcename_ds.selection(true,Datasourcename,NoYes::Yes);
              }
            else
              {
                Datasourcename_ds.selection(true,Datasourcename,NoYes::No);
              }
            Datasourcename_ds.research(true);
           }


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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans