I'm trying to configure a custom "Deactivate" button on a subgrid ribbon in a model-driven Power App, but I'm running into an issue where clicking the button does nothing—no UI feedback, no console logs, and no errors. The same setup works perfectly for main grid, and I just applied the same settings to the subgrid but it doesn't work.
Problem Description:
- When I select a record (in this case, a project) from a subgrid and click the custom "Deactivate" button, nothing happens.
- The browser’s console (Edge Inspect) shows no logs or errors.
- However, in the Network tab, I can see that the web resource library is being loaded when the button is clicked.
Expected Behavior:
- The button should trigger a JavaScript function that checks user roles and either deactivates the selected record or shows an error message if the user lacks permission.
Ribbon Workbench Configuration Details:
-
Ribbon Workbench Setup:
- Button added to the subgrid ribbon.
- Set the Command on the subgrid
- JavaScript Action:
- Library:
the webresource I uploaded - Function:
the function that should be called. - Parameter:
PrimaryControl(CRM Parameter)
- Library:
-
Display Rules:
Mscrm.CanWriteSelected,Mscrm.SelectedEntityHasStatecode (default out-of-the-box rules) -
Enable Rules:
Mscrm.VisualizationPaneNotMaximized,Mscrm.SelectionCountAtLeastOne (default out-of-the-box rules)
Observations:
- The same setup works perfectly on the main grid.
- The difference is that the subgrid version doesn’t trigger the JavaScript function at all.
- I suspect the issue might be with how the parameters are passed in the subgrid context or a bug in the JavaScript function itself.
Question:
Has anyone encountered a similar issue where a subgrid ribbon button fails to trigger the associated JavaScript function? Are there any known differences in how Ribbon Workbench handles subgrid vs. main grid buttons that I should be aware of? Any insights or suggestions would be greatly appreciated!

Report
All responses (
Answers (