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 :
Small and medium business | Business Central, N...
Suggested Answer

Custom dialog in AL

(0) ShareShare
ReportReport
Posted on by 911

I've used Dialog.StrMenu in AL, which allows the user to pick a single item from a list. What if I want to allow the user to pick multiple items from a list? How would I do that?

I have the same question (0)
  • Suggested answer
    Avinash B Profile Picture
    1,455 on at

    Hi

    You can make use of FilterPageBuilder. This is one of the options.

    References :

    docs.microsoft.com/.../filterpagebuilder-data-type

    Regards

    Avinash B

  • Nick Webb Profile Picture
    911 on at

    I've played with this FilterPageBuilder Data Type and I can't see how it is an alternative to Dialog.StrMenu. I'm looking for something that resembles the snapshot below but allows the user to select multiple items instead of one?

    BC_5F00_Dialog.jpg

  • Nick Webb Profile Picture
    911 on at

    Any suggestions on this one?

  • Suggested answer
    Avinash B Profile Picture
    1,455 on at

    Hi

    Refer to this. it might help you.

    community.dynamics.com/.../turn-report-selections-into-a-selection-dialog

    Or just create a ProcessingOnly report with all your options on the Request page.

    Regards

    Avinash B

  • Nick Webb Profile Picture
    911 on at

    Thanks for the response. Before I start investigating, the link above leads to an article written in 2014. Is the functionality detailed in the article still available in modern day Business Central (AL)?

    Also, I don't quite get how one can interpret a multiple-choice user response from a ProcessingOnly report? Excuse my ignorance?

  • Nick Webb Profile Picture
    911 on at

    OK, so this is what I went with:-

    1. Extended the "Document Attachment" table and page, to add a Boolean field called 'Include'.

    2. On clicking the Action, display the extended "Document Attachment" page (via Page.RunModal). This allows the user to multi-select the checkboxes represented by new Boolean field 'Include'.

    3. When user clicks the [Close button], filter the table on fields 'No.' and 'Include' and iterate through result actioning each attachment in users selection.

    Good plan Huh? However, in step 2, I am so far unable to force a filter before displaying to the user, so they're seeing all attachments. It can be manually filtered using the BC Menus, but I need to be able to programmatically force the filter. See code below. Any help would be greatly appreciated?

    local procedure PresentAttachments(InvNum: Code[20])

    var

       DocAttPage: Page "Document Attachment Details";

       lobjAttachedDoc: Record "Document Attachment";

       AttachmentRecref: RecordRef;

       InvNumFieldRef: FieldRef;

    begin

       lobjAttachedDoc.SetFilter("No.", InvNum);

       DocAttPage.SetSelectionFilter(lobjAttachedDoc);

       DocAttPage.RunModal();

    end;

  • Nick Webb Profile Picture
    911 on at

    Progress made. Replacing line:-

    DocAttPage.SetSelectionFilter(lobjAttachedDoc);

    with

    DocAttPage.SetTableView(lobjAttachedDoc);

    did the trick.

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,260 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,515 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,373

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans