web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to make a dropdown box multi select?

(0) ShareShare
ReportReport
Posted on by 272

I am trying to customize a standard drop down in AX which is found in the Product attribute values and enable multiple select:

asddddd.PNG

This dropdown is populated in the method attributeChanged() in the form. It populates the drop down by inserting values on it via a while select statement. Here's a snippet:

// Populate enumeration combo box
enumerationComboBox.clear();
while select TextValue from enumerationValue
join RecId from enumerationAttributeTypeValue
where enumerationAttributeTypeValue.Value == enumerationValue.RecId
join RecId from enumerationDomain
where enumerationDomain.RecId == enumerationAttributeTypeValue.AttributeType &&
enumerationDomain.RecId == localEcoResAttributeType.RecId
outer join TextValue from ecoResTextValueTranslation
where ecoResTextValueTranslation.TextValueTable == enumerationValue.RecId &&
ecoResTextValueTranslation.Language == SystemParameters::getSystemLanguageId()
{
enumerationComboBox.add(ecoResTextValueTranslation.TextValue ? ecoResTextValueTranslation.TextValue : enumerationValue.TextValue );
}


How can I incorporate it to this?:

SysLookupMultiSelectCtrl msCtrlCust;

msCtrlCust = SysLookupMultiSelectCtrl::constructWithQueryRun(
element,
control,
queryRun,
false,
[tablenum(MyTempTable), fieldNum(MyTempTable, MyField)]);

I am using extensions... what I thought about is that create a query in my created class (similar to the standard code that populates the drop down) and code the SysLookupMultiSelectCtrl there. Would it work? Will my extension override the standard method?



*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    239,069 Most Valuable Professional on at

    Is your goal to apply the same attribute twice with two different values?

  • Miguel Zuniga Profile Picture
    272 on at

    Hi Martin.

    Didn't quite get your question, but if you mean that as seen on the photo...

    The Cleaning Method will have Dry clean only and machine wash as its value, then yes.

  • Martin Dráb Profile Picture
    239,069 Most Valuable Professional on at

    I'm trying to understand your business requirement, because the way you're trying to implement it makes no sense to me. Even if you made the lookup, the field won't be able to hold two values and there no business logic would with it. It would a solve nothing.

    And the picture doesn't explain what business problem your customer needs to solve - you'll have to explain it to us.

    I gave a suggestion what you may be trying to implement. I'm not sure what you don't understand there. Do you know what product attributes and how they're used?

  • Miguel Zuniga Profile Picture
    272 on at

    Hi Martin.

    the requirement is that to have multi selection for the drop down box. that's it.

    where the Product Attribute CleaningMethod has Dry clean only and machine wash as its value. Also, I really don't know how these product attributes work. I'm also looking for the table they're stored in, and I can't find it. please enlighten me with how it works and if its possible to enable a multi select drop down for the product attribute values. As well as why it can't hold 2 values...

  • Martin Dráb Profile Picture
    239,069 Most Valuable Professional on at

    No, it's not a business requirement. It's your attempt of a technical solution for some business problem (unknown to us), but it's wrong and wouldn't do anything useful, as I explained above.

    I suspected that you don't understand how the functionality works - that's why you struggle to design something meaningful. You really must understand what problem you're solving, before you can design the new functionality and only later actually writing  some code (if needed).

    Therefore look into documentation and learn about product attributes or ask a functional consultant or an experienced user to explain it to you. Then discuss with the client what business problem they need to solve and think about whether it's feasible and how it could be solved. You may want to ask them same question I asked you "Is your goal to apply the same attribute twice with two different values?".

  • Miguel Zuniga Profile Picture
    272 on at

    Thanks Martin.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
GL-01081504-0 Profile Picture

GL-01081504-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans