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 :
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,

I have the same question (0)
  • WillWU Profile Picture
    22,361 on at

    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.

  • Community Member Profile Picture
    on at

    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,361 on at

    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.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 611 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans