Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Answered

How to hide "Add Existing {Entry Display Name}" and “New {Entry Display Name}"

(1) ShareShare
ReportReport
Posted on by 2
Hi everyone!
I’m working on a model-driven app and I have a subgrid where I need to hide the “New {Entry Display Name}" and "Add Existing {Entry Display Name}" option. As shown in the attached image, all the common options are already disabled, and the command bar editor marks this button as read-only and not supported at the moment.

Is there any workaround using Power Apps or JavaScript to hide this button?

In adition, 
that JS component setCommandBarVisible(false) does not work for one specific control (subgrid). 

Look this is the code that we used: 

I’d appreciate any guidance or examples!

Thanks in advance!
  • Verified answer
    Rajkumar_M Profile Picture
    3,711 Super User 2025 Season 1 on at
    How to hide "Add Existing {Entry Display Name}" and “New {Entry Display Name}"
     
    This is a known limitation in model-driven apps: command bar buttons like “Add Existing {EntityDisplayName}” are legacy commands and cannot be hidden directly via Power Fx or the command bar editor UI (yet).
     
    Option 1: Use Ribbon Workbench (Classic Way – Reliable)
     
    1. Open your solution in Classic Ribbon Workbench via XrmToolBox or PowerApps CLI.
    2. Select the subgrid on the form.
    3. Locate the “Add Existing” button in the subgrid's command bar.
    4. Hide the button by:
      1. Either deleting it
      2. Or adding DisplayRule that always returns false (custom JS or a hidden field condition)
    5. Publish the changes.
     
    📌 Note: Ribbon Workbench is still the only way to truly control legacy buttons like these until Power FX command bar supports it.
     
    Option 2: Use JavaScript to Disable Interaction (Partial Block)

    If hiding isn’t possible, you can use JS to disable interaction or redirect users:
     
    function disableSubgridAddButtons(executionContext) {
        var formContext = executionContext.getFormContext();
        var subgrid = formContext.getControl("Subgrid_new_3");
        if (subgrid) {
            subgrid.setDisabled(true); // disables interaction entirely
        }
    }

    This disables the subgrid, but users can’t click any records either. So this is more of a nuclear option.
     
     
    Thanks!
     
    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.
     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1