Skip to content

Commit d72fce5

Browse files
authored
Merge pull request #8612 from MicrosoftDocs/Update-"button-in-command-bar-not-appear-after-grid-item-selection.md"
AB#5274: improve wording - button-in-command-bar-not-appear-after-grid-item-selection.md
2 parents 65aa5a0 + 4b9c27c commit d72fce5

2 files changed

Lines changed: 26 additions & 22 deletions

File tree

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,53 @@
11
---
2-
title: Button in command bar not showing after grid item selection
3-
description: Button in command bar doesn't appear after grid item selection in Microsoft Dynamics CRM Online.
2+
title: Button in Command Bar Not Showing After Grid Item Selection
3+
description: Resolving the issue where a button in the command bar doesn't appear after selecting grid items in Microsoft Dynamics 365 apps.
44
ms.reviewer:
5-
ms.topic: troubleshooting
6-
ms.date: 03/31/2021
5+
ms.date: 04/07/2025
76
ms.custom: sap:Opportunity
87
---
9-
# Button in command bar doesn't appear after grid item selection in Microsoft Dynamics CRM Online
8+
# Button in command bar doesn't appear after grid item selection
109

11-
This article provides a resolution for the issue that the button customized to show doesn't appear as expected after one or more grid items are selected in Microsoft Dynamics CRM Online.
10+
This article provides a solution to the issue where a custom button on the command bar doesn't appear after selecting one or more grid items in Dynamics 365 apps.
1211

13-
_Applies to:_   Microsoft Dynamics CRM Online
12+
_Applies to:_   Microsoft Dynamics 365
1413
_Original KB number:_   4481268
1514

1615
## Symptoms
1716

18-
There's a custom button that is customized to appear in the grid (either `HomePageGrid` or a `SubGrid`) in Microsoft Dynamics CRM Online.
17+
A custom button is configured to appear in the grid, either in the `HomePageGrid` or `SubGrid` in Dynamics 365 apps.
1918

20-
In web client, this button will appear in the ribbon/command bar, regardless if grid items are selected or not.
21-
22-
In UCI, this button will appear when no grid items are selected, but once one or more grid items are selected, the button is gone.
19+
- In the web client, this button appears in the ribbon or command bar regardless of whether grid items are selected.
20+
- In the Unified Client Interface (UCI), this button appears when no grid items are selected. However, after selecting one or more grid items, the button disappears.
2321

2422
## Cause
2523

26-
As part of the design for UCI, we've changed the behavior to be more context sensitive. Specifically, on grids, buttons are considered either *item specific* or not, and only *item-specific* buttons are shown when one or more items are selected, while non *item-specific* buttons are shown otherwise.
24+
This behavior is by design in the UCI. UCI introduces a context-sensitive approach to button visibility in grids. Specifically:
2725

28-
This means that buttons that don't require an item to be selected, will simply not be shown when an item is selected.
26+
- Buttons are categorized as either item-specific or not.
27+
- When one or more grid items are selected, only item-specific buttons are displayed.
28+
- Buttons that don't require item selection are hidden when grid items are selected.
2929

30-
The method that the determination is made is based on whether the command associated with the ribbon button has a SelectionCount rule. If it has a SelectionCount rule, it's considered to be an *item-specific* command.
30+
The context-sensitive behavior determines whether a button is considered item-specific based on the presence of a [selection count rule](/power-apps/developer/model-driven-apps/define-ribbon-enable-rules#selection-count-rule) in the associated command. If the command has a selection count rule, the button is categorized as item-specific.
3131

3232
> [!NOTE]
33-
> Flyouts and split buttons are excluded from this change, and still shown in both cases of when items are selected or not. This is to ensure that menu items, some of which may be generated dynamically, isn't incorrectly hidden.
33+
> Flyouts and split buttons are excluded from this behavior and are displayed regardless of item selection. This ensures that dynamic menu items aren't hidden incorrectly.
3434
3535
## Resolution
3636

37-
This is designed behavior that affects all buttons not just custom buttons, but out of box buttons as well (Note - flyouts and split buttons excluded since they have a menu with further child buttons and can't be easily categorized). This is an explicit design change from web client to Unified Client.
37+
This design affects all buttons, including both custom and out-of-box buttons, except for flyouts and split buttons. This change helps prioritize item-specific commands by hiding non-item-specific buttons during item selection.
3838

3939
In most cases, it's helpful to hide buttons that don't act on selected items, so that *item-specific* commands appear more prominently.
4040

41-
If there's a strong scenario where users will need to run a generic command, unrelated to the items selected, during item selection, then the following workaround can be used:
42-
43-
In the definition of their Custom Ribbon Command, add the following rule:
41+
If you need to run a generic command unrelated to the items selected during item selection, you can add the following rule to the definition of the custom ribbon command:
4442

45-
```console
43+
```XML
4644
<EnableRule Id="Mscrm.AnySelection" />
4745
```
4846

49-
This will cause the Unified Client to treat this command as both an *item-specific* command, and a non-item specific command, and display in both cases.
47+
This rule causes the Unified Client to treat the command as both an item-specific and a non-item-specific command, ensuring the button appears in both scenarios.
48+
49+
## More information
50+
51+
[Enhanced user experience with Unified Interface for model-driven apps](/power-apps/user/unified-interface)
52+
53+
[Ribbons in model-driven apps](/power-apps/developer/model-driven-apps/ribbons-available)

support/dynamics-365/sales/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
href: welcome-sales.yml
33
- name: Customization
44
items:
5-
- name: Button in command bar don't show after grid item selection
5+
- name: Button in command bar doesn't appear after grid item selection
66
href: button-in-command-bar-not-appear-after-grid-item-selection.md
77
- name: Enterprise Marketing
88
items:

0 commit comments

Comments
 (0)