Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

Problem in Multi selection lookup parameter name

(0) ShareShare
ReportReport
Posted on by 5

when i select my multi selection lookup dialog it show in integer (0;1;2.....) but in my case i want it to show as high, urgent, low etc .

the blow picture will explain what i am trying to say.

i have used UI builder class for multi selection is working correctly.

can anyone help with code to meet my problem?

  • RE: Problem in Multi selection lookup parameter name

     GirishS 

     Mohit Rampal 

    thamks both of you

    I Create a table and store an Enum element as Sting value, its worked.

  • Verified answer
    GirishS Profile Picture
    GirishS 27,832 Super User 2024 Season 1 on at
    RE: Problem in Multi selection lookup parameter name

    I think it will be better if you create a table for that to store an Enum elements as string value and use that table in a multiselect lookup query.

    Thanks,

    Girish S.

  • RE: Problem in Multi selection lookup parameter name

    Hi GirishS

    Correct but if some one need then?

  • Verified answer
    GirishS Profile Picture
    GirishS 27,832 Super User 2024 Season 1 on at
    RE: Problem in Multi selection lookup parameter name

    Hi Mian,

    Is Priority is the Enum field?

    If it's an Enum field, you will get in numbers only.

    Thanks,

    Girish S.

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,547 Super User 2024 Season 1 on at
    RE: Problem in Multi selection lookup parameter name

    Your code looks fine but not sure what's the issue here. Can you try below article, this should work as its storing the values in list getFromDialog method and displaying string later

    dynamicsaxforall.blogspot.com/.../multiselect-lookup-on-dialog-in-ui.html

  • RE: Problem in Multi selection lookup parameter name

    Here is the output of that code.


  • RE: Problem in Multi selection lookup parameter name

    Hi Mohit Rampal ,

    here is my code snippet.

    class DemoMultiLookupUIBuilder extends SysOperationAutomaticUIBuilder

    {

       OCMS_PurchReqContract   contract;

       DialogField        Dialogpriority;

       public void postBuild()

       {

           contract = this.dataContractObject() as OCMS_PurchReqContract;

           Dialogpriority = this.bindInfo().getDialogField(contract, methodStr(OCMS_PurchReqContract, parmPriority));

           Dialogpriority.lookupButton(FormLookupButton::Always);

       }

       public void postRun()

       {

           Query            query        = new Query();

           QueryBuildDataSource    qbdsLegalEntity     = query.addDataSource(tablenum(PurchReqLine));

           qbdsLegalEntity.fields().addField(fieldNum(PurchReqLine, Priority));

           qbdsLegalEntity.addGroupByField(fieldNum(PurchReqLine, Priority));

          // qbdsLegalEntity.fields().addField(fieldNum(PurchReqLine, Name));

           container selectedFields = [tableNum(PurchReqLine), fieldNum(PurchReqLine, Priority)];

           SysLookupMultiSelectCtrl::constructWithQuery(this.dialog().dialogForm().formRun(), Dialogpriority.control(), query, false, selectedFields);

       }

    }

  • Mohit Rampal Profile Picture
    Mohit Rampal 12,547 Super User 2024 Season 1 on at
    RE: Problem in Multi selection lookup parameter name

    Hi, Have you tried replicating the code mentioned in the article? As you can see in the article, the selected values in multi select lookup is returning as String. If still issues, please share your code.

  • RE: Problem in Multi selection lookup parameter name

    Hi Mr. Mohit Rampal

    thanks for Repay, my UI builder class working well, but in parameter when i select High, Medium, it show (1;2) and I want (High; Medium)

  • Verified answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,547 Super User 2024 Season 1 on at
    RE: Problem in Multi selection lookup parameter name

    Hi, If you are using UI builder class then please check this article

    ariste.info/.../

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,419 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,492 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans