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 :
Business Central forum

Multi checkbox in List page in AL Extension

(0) ShareShare
ReportReport
Posted on by 55

Hi,

I want to add multi selection checkbox in my custom listing page in AL extension and also want to remove selected records from the listing page from Run button. Can anyone help me how to add multi selection checkbox and how to pass id of selected records to Codeunit.

Thanks,

Amit.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    You can add a boolean field to your source table and display this field on the list.

    A second way could be using MARK for marking the selected records:

    1) Create a page field called "Selected" with SourceExpression = MARK.

    2) Add an action call "Select" on the page

    3) In the OnAction trigger add a local variable that points to your table (here called YourTable) and add the following code:

    CurrPage.SETSELECTIONFILTER(YourTable);

    IF YourTable.FINDSET THEN

    REPEAT

     GET(YourTable.XXX);  //Here you've to select the record by primary key, I've called the primary key XXX

     MARK(TRUE);

    UNTIL YourTable.NEXT=0;

    To deselect the record, add a new action with MARK(false).

  • Suggested answer
    Amit Bansal Profile Picture
    55 on at

    Hi Stefano,

    Thanks for your quick response, CurrPage.SetSelectionFilter(<TableName>);  works for me, I was searching how to get the selected value from list page and this function gives me selected rows and we can pick the key field from the source table and can do further manipulation.

    Thanks again.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans