Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

How to use a List in a dialog form ?

(0) ShareShare
ReportReport
Posted on by 207

Hi guys,

I need to use a custom field with multiselect lookup on a dialog form. ( i extended the right class and implemented it)

Which type of Edt should i use to get the values from this custom field ?

And how to implement it in code (i didnt find any example) ?

For now i tried to add a string field on this dialog and the value from this field is : "524C; 525C; 526C", that s the multiselection i made.

But i need to use this values separtly to loop on it so i thought that i need a list and iterate on it, is it right ?

Someone could help ?

Regards.

  • Suggested answer
    Mohit Rampal Profile Picture
    12,556 Moderator on at
    RE: How to use a List in a dialog form ?

    Hi, You can try below code to loop through all selected values from string control. Replace InputStr with your string control name that have values. You can create this code in method and pass string control as parameter.

    List            list = new List(Types::String);
    ListIterator    iterator;
    
    list = Global::strSplit(InputStr, ";");
    iterator = new ListIterator(list);
    
    while (iterator.more())
    {
        info(strfmt("%1",iterator.value()); //This will give individual value
    }
    

  • Suggested answer
    GirishS Profile Picture
    27,823 Moderator on at
    RE: How to use a List in a dialog form ?

    Hi Awaxx,

    Yes, you need to use container function to get the selected value from the multiselect lookup class. Multiselect Lookup class will have method to get the selected value as container.

    Refer to the below blogs and see if it was helpful.

    https://erpdax.wordpress.com/2014/09/05/how-to-select-multiple-selected-values-records-from-lookups-in-dynamics-ax/

    https://stoneridgesoftware.com/how-to-create-multi-select-lookup-in-microsoft-dynamics-ax/

    Thanks,

    Girish S.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,278 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,011 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans