I want to add another button to this view. Is that possible? I’ve tried putting it on the main grid, but it does not appear. Here is my view, and here is how I have tried to configure it.
I tried to configure it in the same way that the deactivate and activate button is configured, but no luck. What can I do?? I have highlighted where I want it to appear.
Not sure as too where you want to place it, as you describe both subgrid and main grid, but the image of ORDR-1566 is an associated grid.
So I am going to assume you want it there.
You need to select the associated view, add the button there, then you need to publish all customization and wait a bit, even through your make a hard refresh (ctrl + r) I believe you need too wait minutes before the updates actually shows.
If you have PowerFx enabled, you should be able to choose "Show on condition from formula" in the visibility drop down, and make a simple formular like: CountRows(Self.Selected.AllItems) > 0
If you don’t have PowerFx, you need to use Ribbon workbench, this requires creating an unmanaged solution, adding only the entity where you need to append the button too. and open it from Ribbon Workbench (XrmToolBox), from here you can set visibility rules and what commands to show / hide.
Hi @Felice_Marcus
This is a common one. Your button is working; it’s just on a different command bar.
The Issue:
The grid inside your Order form is a subgrid, which has its own separate command bar. Buttons added to “Main grid” only show when you open that table standalone.
Fix:
- Go to the Attachment table → Edit command bar
- Find the option in the popup matching your subgrid context (one will match exactly)
- Create your button there; it should appear next to Edit/Activate/Deactivate
Watch Out For:
- primarycontrol: Returns the parent Order form, not the grid row. Adjust your function parameters.
- Visibility rules: Set to “Row selected” so it only shows when a row is selected.
Give it a try and let us know if it works. If you hit issues with parameter mapping or visibility, happy to hop on a quick call.
E: Hardik.gupta@allgrowtech.com
Hi Steven,
Thank you so much for your reply. It got me on the right track and the problems is solved! A few things that I want to add that I learned.
The Attachments tab was actually the subgrid, but there is also an Attachment that is an associated grid. Maybe I shouldn’t name that tab the same as the Associated grid.
Another learning was that the PowerFx formula is only enabled on the App level for buttons, not on the Table level, and I had it on the table level as a modern command button. Once I moved it to the app level it was visible and the formula worked.
Greatly appreciate your help!