Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Multiple select from dialog field in RunbaseBatch

(0) ShareShare
ReportReport
Posted on by

Hello everyone,

I know we're now usually using SysOperation Framework for create batch job in D365 F&O. And for dialog field that requires multiple select from lets say Customer number dropdown, we're using attribute AifCollectionType and all.

How to create the same multiple selection in dropdown with RunBaseBatch ? and what all other necessary thing that required to be included to make it works ?

Thanks,

  • WillWU Profile Picture
    22,357 on at
    RE: Multiple select from dialog field in RunbaseBatch

    Hi WWwong,

    This is a Query macros to store queries.

    You can use the Query macros like this.

      Table table
        #localMacro.selecttest
           select * from table
        #endmacro
    
        #localMacro.wheretest
           where %1.field==%2
        #endmacro
    
           #selecttest
           #wheretest(table,'123');

    This macro is not particularly necessary here.

    And the whole piece of code is in the class MultiSelectRunBaseBatch , you need to put the code into the class.

  • Community Member Profile Picture
    on at
    RE: Multiple select from dialog field in RunbaseBatch

    Hi Will,

    Thanks for the link. As I tried to follow, what is the meaning of the "macro" ->

    #define.CurrentVersion(1)

       #localMacro.CurrentList

           warehouses

       #endmacro

    I got stuck at the "DialogPostRun" method, at the line -> warehouseMultiSelect.set([this.warehouseIdsToRecIds(warehouses), warehouses]);

    Obviusly I changed to my object name, but it keep telling me the variable "warehouses" (which I replaced, and is the same as the one I declared in the macro) is not declared

    By looking at the whole Variable declaration, actually there are 2 variable "warehouses"

        container                   warehouses;

        SysLookupMultiSelectCtrl    warehouseMultiSelect;
        FormBuildStringControl      warehouseCtrl;
        DialogField                 warehousesField;
     
        #define.CurrentVersion(1)
        #localMacro.CurrentList
            warehouses
        #endmacro
    Is it refer to the container variable ? and why need to put in the "local macro" ? what is the usage and purposes ?

    Thanks,

  • WillWU Profile Picture
    22,357 on at
    RE: Multiple select from dialog field in RunbaseBatch

    Hi WWwong,

    See the Blog:

    https://daxonline.org/1614-multi-select-parameters-in-dialogs.html

    pastedimage1591243599635v1.png

    SysOperations is a newer framework, it provides better separation of concerns, generation of dialogs from data contracts and quite a few additional features,you should use SysOperation instead of RunBase in your work.

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 601 Most Valuable Professional

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 416

#3
Adis Profile Picture

Adis 384 Super User 2025 Season 1

Product updates

Dynamics 365 release plans