web
You’re offline. This is a read only version of the page.
close
Skip to main content
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)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    299,022 Super User 2025 Season 2 on at
    RE: Disable menu item button when multiple records are selected

    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.

  • Community Member Profile Picture
    on at
    RE: Disable menu item button when multiple records are selected

    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.

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    299,022 Super User 2025 Season 2 on at
    RE: Disable menu item button when multiple records are selected

    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#2
Guy Terry Profile Picture

Guy Terry 2 Moderator

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans