Ribbon and command bar customisation

How to add, remove, and modify commands on the model-driven app command bar — the modern command designer and the ribbon-XML legacy.

Updated 2026-12-06

The command bar (formerly called the ribbon) is the row of actions at the top of every model-driven app page — Save, New, Delete, Email, Export, custom actions specific to the app. Customising it lets you surface organisation-specific functions in the right place. The modern path is friendly; the legacy ribbon-XML pattern is still relevant for older customers.

The modern command designer. Microsoft now provides a graphical command designer inside the modern maker portal. From the maker portal, navigate to a table's command bar; the designer shows the existing commands and lets you:

  • Add a command — name, icon, label, and the action it performs.
  • Edit a command — change label, icon, visibility, action.
  • Delete or hide an existing command (without affecting other apps).
  • Set visibility rules — show / hide the command based on field values, user role, or business state.
  • Set enabled rules — grey out the command unless conditions are met.
  • Sort the order in which commands appear.

Action types. A command can do one of several things:

  • Run a JavaScript function — the classic ribbon pattern; calls a custom function in a web resource.
  • Run a Power Fx formula — newer pattern; the action is expressed in Power Fx (the same language as canvas apps).
  • Run a Power Automate flow — trigger a cloud flow with the current record context.
  • Open a Power App — launch a canvas or custom app with parameters.
  • Open a URL — navigate to an external page.

Visibility and enabled rules. Both rules are Power Fx expressions evaluating in the form's context:

  • VisibilitySelf.Selected.AllItems.Status = "Active" shows the command only for active records.
  • EnabledUser().Email = "..." enables only for specific users (rare; usually role-based instead).
  • Run command — what happens when clicked.

The Power Fx integration replaces what previously required JavaScript display rules and enable rules.

Where commands appear. The same table can have commands in different contexts:

  • Main form command bar — on the record-level view.
  • List view command bar — at the top of the table's grid.
  • Subgrid command bar — embedded in a parent form's subgrid.
  • Associated view command bar — when viewing related records.

Each context has its own command set; you can have a command on the main form but not in the list view, or vice versa.

App-specific commands. Modern command customisation can be app-scoped — a command appears in App A but not App B, even on the same table. Useful when multiple apps share a table but need different actions.

The ribbon-XML legacy. Older customisations use ribbon XML — verbose XML files defining commands, display rules, enabled rules, library references. Ribbon XML is still supported but no longer recommended for new work; migrate to the modern command designer when possible.

Common patterns.

  • One-click custom action — "Generate Quote PDF", "Send to ERP", "Mark as VIP", "Calculate Discount" — buttons that run a flow or script.
  • Hide standard commands — for security or simplification (hide Delete from non-admin users).
  • Conditional surface — "Approve" button visible only when status is Pending Approval AND user is in Approvers role.
  • App-specific surfacing — "Send Quote" in the Sales app but not in the Service app on the same Quote record.

Limits.

  • No nested submenu beyond one level — keep commands flat.
  • Custom icons are limited to predefined icon set; uploading bespoke icons is supported but with effort.
  • Performance — many commands with complex Power Fx rules slow form load. Audit.

Common pitfalls.

  • Hiding standard commands that users need — users complain "I can't find Save anymore". Always test as the user.
  • Visibility rules that don't account for record states — commands invisible when they should be visible.
  • Cross-app surprises — adding a command in one app accidentally affects another. Use app-scoped commands.

Operational discipline. Document the command catalogue per app per table. Audit annually — retire commands that aren't used; surface new ones for emerging workflows. Train users when adding meaningful new commands.

Related guides