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,...
Suggested Answer

Show/hide a command on certain forms

(0) ShareShare
ReportReport
Posted on by 2
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)
  • Suggested answer
    11manish Profile Picture
    886 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.

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 Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Hamza H Profile Picture

Hamza H 140 Super User 2026 Season 1

#2
Nagaraju_Matta Profile Picture

Nagaraju_Matta 128

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 70 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans