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 :
Power Platform Community / Forums / Power Apps / How to hide "Add Exist...
Power Apps
Answered

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

(2) ShareShare
ReportReport
Posted on by 6
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!
image (1).png
image (2).png
I have the same question (0)
  • Verified answer
    Rajkumar_M Profile Picture
    3,747 Moderator on at
     
    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.
     
  • Suggested answer
    CD-09010354-0 Profile Picture
    2 on at
     
    I know this is marked as answered, but I was looking at this same issue today.  Perhaps there was a change since the question was posted, but I saw there is a checkbox at the bottom of the configuration parameters to hide buttons from the command bar editor (below). 
     
     
    I was able to hide both New and one Add Existing buttons.  The second Add Existing did not let me change any settings, but that didn't seem to matter.
      
     

    When I look at the subgrid command buttons, none of the New/Add Existing buttons were visible. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,055

#2
Valantis Profile Picture

Valantis 666

#2
11manish Profile Picture

11manish 666

Last 30 days Overall leaderboard