web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Show/hide a command on certain forms

(1) ShareShare
ReportReport
Posted on by 6
Hi,

I am searching for a way show/hide the "new" command buttons based on the form/formId. I know it is possible with the ribbon workbench, but I want to try it with the command buttons. Does anyone have any experience, or does anyone know how to do it?

I was trying to do it with a fx formula, but that didn't work out, or I didn't find the right formula.
 
I have the same question (0)
  • Verified answer
    11manish Profile Picture
    1,098 on at
    At the moment, Power Fx formulas in the modern Command Designer cannot access the current Form ID, so you cannot directly show/hide command buttons
     
    based on the form being used.
     
    For form-specific button visibility, the recommended approach remains:
    Ribbon Workbench      +  JavaScript Custom Rule
    using:
    • primaryControl.ui.formSelector.getCurrentItem().getId()
    to determine the current form and return true or false for the button visibility.
  • Verified answer
    Manoj - ManoVerse Profile Picture
    1,396 Super User 2026 Season 1 on at
    This isn’t supported with modern command buttons. You can’t access formId or form name in Power Fx visibility rules. Only basic context (record fields, form state like New/Edit) is available, If you need form-specific visibility, you still have to use Ribbon Workbench, this is exactly why Microsoft has not deprecated the classic ribbon yet, modern commanding still has functional gaps like this.
    If this helped, please mark this answer as verified so it can help others facing the same limitation.
     
     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Manoj - ManoVerse Profile Picture

Manoj - ManoVerse 131 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 95

#3
Chris1968 Profile Picture

Chris1968 20

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans