Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

How to set values to multiselect lookup control?

(0) ShareShare
ReportReport
Posted on by 95

I have a container of values when i close the form, the value is saved in a container from multiselect control. I need to reselect those values in multiselect lookup when i reopen the form . Is this possible? how can i achieve this?

*This post is locked for comments

  • Verified answer
    RE: How to set values to multiselect lookup control?

    This issue has been resolved. I store the values in container on closing the form as:

    Con x,y,z;

    X=multiselectctrl.get();

    Y=multiselectctrl.getSelectedfieldvalue()

    Z=[x,z]

    Then store Z in table:

    Table.ConField =Z;

    While opening the form in init method I set these values:

    multiselectctrl.set(table.ConField);

    In this way values was selected in multiselect lookup control while form opening.

  • Vilmos Kintera Profile Picture
    Vilmos Kintera 46,149 on at
    RE: How to set values to multiselect lookup control?

    That article does not help with initialization.

  • Suggested answer
    István Orosz Profile Picture
    István Orosz 2,137 on at
    RE: How to set values to multiselect lookup control?

    Hi,

    You can refer to this article about multiselect lookup control.

    Regards,

    István

  • Suggested answer
    Vilmos Kintera Profile Picture
    Vilmos Kintera 46,149 on at
    RE: How to set values to multiselect lookup control?

    It is possible, you would have to implement it yourself though.

    Have a look at \Classes\SysLookupMultiSelect\selectAll(), this method is ticking all entries in the list.

    You could write your own custom logic where you pass in the selected container/list during your form init/run, and only select the specific IDs in the list.

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,031 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,868 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans