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

Custom dialog in AL

(0) ShareShare
ReportReport
Posted on by 891

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
    891 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
    891 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
    891 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
    891 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
    891 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

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,785

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,007 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 948 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans