Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Multiple select from d...
Finance forum
Unanswered

Multiple select from dialog field in RunbaseBatch

Posted on by Microsoft Employee

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
    WillWU 22,344 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
    Community Member Microsoft Employee 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
    WillWU 22,344 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.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans