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)

Disable menu item button when multiple records are selected

(0) ShareShare
ReportReport
Posted on by

I have the following situation:

One table is datasourse of the form. The same table has one 'NoYesCombobox' field which is showing on the form's grid. Also on the form, there is one Action menu item button.

When multiple records on the form are selected, if one of the value of the selected records of the 'NoYesCombobox' is NO the Action menu item button should be disabled and an error message should appear.

Otherwise if all of them are Yes, it should be enabled and do another logic.

So, I tried to solve this with overriding the active method of the form datasource and put the condition:

if (condition)

{

actionMenuItemButton.enabed(false);

}

But, with this if one of the value of the 'NoYesCombobox' No, and others are Yes, it still enables the button.

Is there any other solution for this?

Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    304,553 Super User 2026 Season 1 on at

    Hi Butterfly12345,

    There is a property on the form menu item called 'MultiSelect'. You can set this to no. Then only one record can be selected for the menu item. If you need more records selected, then you can consider adding a condition in the logic with help of x++ coding to skip actions based on the 'NoYesCombobox' value.

  • Community Member Profile Picture
    on at

    Yes, that property is set to Yes.

    As I said,When multiple records on the form are selected, if one of the value of the selected records of the 'NoYesCombobox' is NO the Action menu item button should be disabled , but it is not.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    304,553 Super User 2026 Season 1 on at

    Hi Butterfly12345,

    When you select multiple records, the contents are not evaluated. The most easy solutions are provided above. I don't know if there are methods to catch when records are selected and then interact with the result. If there is an option, I would not like to use it. Imagine a user can select all records, then the form will be freezing to evaluate if a button should be active or not. So, I would suggest to use one of the suggestions provided in my previous answer to prevent form freezing which would be a performance issue in the view of the user.

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
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans