Selecting check box to select all

Hi ,

I have a form(Template) which has 10 fields. Multiple lines can be inserted here. There is a Menu item button at the bottom which says “Transfer to journal”. Just before the first field i have created a checkbox, which comes before every line. The questions i have is:

  1. How do i get an option Select all the lines using the check box or deselect all the lines using the check box.

2.The functionality is i should be able to check on one line and when i click on transfer to journal only that line must be posted.Similarly i select 3 or multiple lines using the check box, only those 3 lines or multiplelines should get posted not the other lines which are not checked

  1. After these line get posted, the lines should not be visible(Only those which are posted), other should be visible. For that i have created a combobox, having Enum value Open and All. Open showing only those lines which are not posted. Please help on this one too…

I am new to AX and this is a little urgent.



anyone online who can help me with this


Either use the standard logic in AX for selecting records (it depends on your version of AX which you forgot to mention) or tell us how you implemented the check box. If it’s saved to database, your posting logic should select from database only the records with the flag checked. Don’t forget that there may be several users trying to post different data in the same, therefore you have to be able to distinguish between them. You may also save the selection status only on the form and not in database.

AX 2012 has built in support for selecting the multiple rows in a grid and by choosing the top check box all the rows will be selected.

You can make use of MultiSelectionHelper class to loop through the selected records.


MultiSelectionHelper multiSelectionHelper = MultiSelectionHelper::construct();

RecordSetInsert myTable; //the table in form.



myTable = multiSelectionHelper.getFirst();

while (myTable.RecId)


myTable.delete(); // you need have the posting logic here

myTable = multiSelectionHelper.getNext();


for that you need to update the field and need to apply a range on the field, apply the value(open) to the range in the dataSource executeQuery method.

The executeQuery method need to called after the operation to post the journal gets completed.